> Oh I forgot, we already have this feature... :)
>
> void mc::DefaultDisplayBufferCompositor::composite(mc::SceneElementSequence&&
> scene_elements)
> {
> report->began_frame(this);
>
> auto const& view_area = display_buffer.view_area();
> auto const& occlusions = mc::filter_occlusions_from(scene_elements,
> view_area);
>
> Using this existing implementation would be preferable. It's just harder to
> modify now that we have display groups with the swap buffers call outside of
> the compositor. But not impossible. Plus doing the fix in the compositor would
> address my concerns for the future too.
>
> All we need to do is return some result to the caller to tell them whether we
> have repainted (empty renderable_list), and so whether they should swap
> buffers.
Having thought about implementing this suggestion I don't think it works. (At least, not simply.)
The criteria for repainting is more complex that "!renderable_list.empty()". For example, when the last surface is removed from the view area the current proposal repaints, but, as I understand your suggestion it would not.
> Oh I forgot, we already have this feature... :) layBufferCompos itor::composite (mc::SceneEleme ntSequence& & >began_ frame(this) ; buffer. view_area( ); occlusions_ from(scene_ elements,
>
> void mc::DefaultDisp
> scene_elements)
> {
> report-
>
> auto const& view_area = display_
> auto const& occlusions = mc::filter_
> view_area);
>
> Using this existing implementation would be preferable. It's just harder to
> modify now that we have display groups with the swap buffers call outside of
> the compositor. But not impossible. Plus doing the fix in the compositor would
> address my concerns for the future too.
>
> All we need to do is return some result to the caller to tell them whether we
> have repainted (empty renderable_list), and so whether they should swap
> buffers.
Having thought about implementing this suggestion I don't think it works. (At least, not simply.)
The criteria for repainting is more complex that "!renderable_ list.empty( )". For example, when the last surface is removed from the view area the current proposal repaints, but, as I understand your suggestion it would not.