Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#10695 closed Patch - Bug Fix (fixed)

[PATCH] libmythui: Fix a redraw bug in MythUIType

Reported by: Lawrence Rust <lvr@…> Owned by: stuartm
Priority: minor Milestone: 0.27
Component: MythTV - General Version: Master Head
Severity: medium Keywords: keypress redraw tearfree
Cc: Ticket locked: no

Description

While evaluating the ATI Catalyst driver 'TearFree? Desktop' option I noticed that sometimes a keypress was apparently being held up until the time on the main menu was updated. Initially I thought that this was a lirc or fglrx issue, but on investigation it turned out that MythMainWindow::animate was requesting updates for empty repaint regions. Delving further showed that MythUIType::Draw was resetting m_DirtyRegion to empty even if the clipRect was smaller, thus leaving unpainted regions.

m_DirtyRegion may be extended by HandleMovementPulse?, SetRedraw? or SetChildNeedsRedraw? etc AFTER GetDirtyArea? is called. So when MythUIType::Draw is called, clipRect may not include the whole of m_DirtyRegion.

This patch subtracts the Draw clipRect from m_DirtyRegion instead of simply emtying it.

Attachments (1)

0001-libmythui-Fix-a-redraw-bug-in-MythUIType.patch (2.1 KB) - added by Lawrence Rust <lvr@…> 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Lawrence Rust <lvr@…>

comment:1 Changed 12 years ago by beirdo

Owner: set to stuartm
Status: newassigned

comment:2 Changed 11 years ago by stuartm

Milestone: unknown0.27
Status: assignedaccepted

comment:3 Changed 11 years ago by Lawrence Rust <lvr@…>

Resolution: fixed
Status: acceptedclosed

In 39984eb579369f6cb25cd8f57acb8b23ebcccfc6/mythtv:

libmythui: Fix a redraw bug in MythUIType

While evaluating the ATI Catalyst 'TearFree? Desktop' option I noticed
that sometimes a keypress was apparently being held up until the time
on the main menu was updated. Initially I thought that this was a lirc
or fglrx issue, but on investigation it turned out that MythMainWindow::animate
was requesting updates for empty repaint regions. Delving further
showed that MythUIType::Draw was resetting m_DirtyRegion to empty
even if the clipRect was smaller, thus leaving unpainted regions.

m_DirtyRegion may be extended by HandleMovementPulse?, SetRedraw?
or SetChildNeedsRedraw? etc AFTER GetDirtyArea? is called.
So when MythUIType::Draw is called, clipRect may not include the whole
of m_DirtyRegion.

This patch subtracts the Draw clipRect from m_DirtyRegion instead of
simply emtying it.

Fixes #10695

Signed-off-by: Lawrence Rust <lvr@…>
Signed-off-by: Stuart Morgan <smorgan@…>

comment:4 Changed 11 years ago by Lawrence Rust <lvr@…>

In 2d2932ac11ed6d01f05f502a8e373455774ba46a/mythtv:

libmythui: Fix a redraw bug in MythUIType

While evaluating the ATI Catalyst 'TearFree? Desktop' option I noticed
that sometimes a keypress was apparently being held up until the time
on the main menu was updated. Initially I thought that this was a lirc
or fglrx issue, but on investigation it turned out that MythMainWindow::animate
was requesting updates for empty repaint regions. Delving further
showed that MythUIType::Draw was resetting m_DirtyRegion to empty
even if the clipRect was smaller, thus leaving unpainted regions.

m_DirtyRegion may be extended by HandleMovementPulse?, SetRedraw?
or SetChildNeedsRedraw? etc AFTER GetDirtyArea? is called.
So when MythUIType::Draw is called, clipRect may not include the whole
of m_DirtyRegion.

This patch subtracts the Draw clipRect from m_DirtyRegion instead of
simply emtying it.

Fixes #10695

Signed-off-by: Lawrence Rust <lvr@…>
Signed-off-by: Stuart Morgan <smorgan@…>
(cherry picked from commit 39984eb579369f6cb25cd8f57acb8b23ebcccfc6)

Note: See TracTickets for help on using tickets.