mirror of
https://github.com/brl/mutter.git
synced 2025-02-20 06:54:10 +00:00

When pushing a framebuffer it would previously push COGL_INVALID_HANDLE to the top of the framebuffer stack so that when it later calls cogl_set_framebuffer it will recognise that the framebuffer is different and replace the top with the new pointer. This isn't ideal because it breaks the code to flush the journal because _cogl_framebuffer_flush_journal is called with the value of the old pointer which is NULL. That function was checking for a NULL pointer so it wouldn't actually flush. It also would mean that if you pushed the same framebuffer twice we would end up dirtying state unnecessarily. To fix this cogl_push_framebuffer now pushes a reference to the current framebuffer instead.