Improvements to CoglJournal
This branch removes a lot of journal flushes from CoglJournal, and batches it much more.
There were a few journal flush triggers found:
-
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. -
cogl_framebuffer_clear4f()
requires both DEPTH and COLOR buffers to go through the fast path. However, it also modifies thebuffer
variable and remove the DEPTH bit if it is not needed. That means the fast path was never hit. -
cogl_framebuffer_set_viewport()
flushes the journal the viewport changes. After a big call chain, it ends up markingCoglFramebuffer->clear_clip_dirty = TRUE
, which makescogl_framebuffer_clear4f()
not hit the fast path. -
cogl_framebuffer_push_rectangle_clip()
pushes aCOGL_CLIP_STACK_RECT
to the clip stack. However,ClutterStage
also uncoditionally pushes a scissor clip (and that adds aCOGL_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