"acquireFramebuffer" operation causing major lag spikes. Does anybody know what this does and what could be causing it?

As you can see in this screenshot, all of the regular calculations and render processes happen at the start of the frame taking around 3 ms, but then suddenly this mysterious operation called acquireFramebuffer takes up 35 ms of the frame. When the game is not experiencing sudden lagspikes and is running smoothly, the acquireFramebuffer operation runs until the end of the regular 16ms frame window.