[PATCH 1/2] compositor: don't schedule idle_repaint from calls to repaint
krh at bitplanet.net
Mon Oct 24 12:31:35 PDT 2011
On Mon, Oct 24, 2011 at 3:22 PM, Ander Conselvan de Oliveira
<conselvan2 at gmail.com> wrote:
> Em 24-10-2011 18:57, Kristian Høgsberg escreveu:
>> On Mon, Oct 24, 2011 at 9:30 AM, Ander Conselvan de Oliveira
>> <ander.conselvan.de.oliveira at intel.com> wrote:
>>> wlsc_output_repaint may call wlsc_surface_damage indirectly through
>>> wlsc_output_set_cursor. If this happens in the call made from repaint,
>>> one ends up with repaint being called from both idle_repaint and
>>> Fix this by setting output->repaint_scheduled to 1 before calling
>>> wlsc_output_repaint in the function repaint.
>> Ah, yes, I see. Good catch. I think we want a slightly different fix
>> though. The damage that is added in wlsc_output_set_cursor() gets
>> fixed up in the following repaint, so we need to make sure
>> repaint_needed is cleared to 0 after wlsc_output_repaint(). I would
>> prefer to only clear repaint_scheduled in the else clause of if
>> (output->repaint_needed) in wlsc_output_finish_frame(), and just not
>> set it to 1 in repaint() (see attached patch). That way we only clear
>> repaint_scheduled, when there really isn't a repaint scheduled. Does
>> that work for you?
> Yep. That's a lot better.
More information about the wayland-devel