Skip to content

Improvements to CoglJournal

Georges Basile Stavracas Neto requested to merge gbsneto/software-picking into master

This branch removes a lot of journal flushes from CoglJournal, and batches it much more.

There were a few journal flush triggers found:

  1. cogl_framebuffer_set_dither_enabled() always flushes the journal. Because it is executed both before and after painting the pick colored rectangles, all painting done at pick time was being submitted to GPU.
  2. cogl_framebuffer_clear4f() requires both DEPTH and COLOR buffers to go through the fast path. However, it also modifies the buffer variable and remove the DEPTH bit if it is not needed. That means the fast path was never hit.
  3. cogl_framebuffer_set_viewport() flushes the journal the viewport changes. After a big call chain, it ends up marking CoglFramebuffer->clear_clip_dirty = TRUE, which makes cogl_framebuffer_clear4f() not hit the fast path.
  4. cogl_framebuffer_push_rectangle_clip() pushes a COGL_CLIP_STACK_RECT to the clip stack. However, ClutterStage also uncoditionally pushes a scissor clip (and that adds a COGL_CLIP_STACK_WINDOW_RECT to the stack). The consequence of the rectangle + scissor clip together is that the journal fails to check if the point is cached.

1-3 are fixed by this merge request.

Edited by Georges Basile Stavracas Neto

Merge request reports