[mythtv-commits] mythtv commit: r27028 by markk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Fri Oct 29 03:03:50 UTC 2010


      Author: markk
        Date: 2010-10-29 03:03:50 +0000 (Fri, 29 Oct 2010)
New Revision: 27028
   Changeset: http://svn.mythtv.org/trac/changeset/27028

Log:

Backport r27000 from trunk to release-0-24-fixes.

Reset the MythImage? parent when the painter is deleted.

MythImage? objects are allocated by the painter classes so that the
painter classes can keep track of painter specific resources that have
been allocated (e.g. OpenGL textures, VDPAU bitmaps etc). The MythImage?
objects then keep a record of the painter that allocated them so that
they can inform that painter when they are being deleted and hence those
resources can ben deleted. MythImage? makes no other use of the
parent/painter pointer it keeps.

During video playback, the OpenGL, VDPAU and Direct3D renderers may
delete and recreate the painter when the video source has changed - BUT
the OSD itself is not deleted. This significantly reduces the overhead
during input changes, minimises the visual impact of recreating the OSD
and ensures we don't 'lose' OSD elements (when the OSD is re-

If the painter is re-created, any subsequent UI element deletion may
trigger a crash as the parent for any MythImage? is no longer valid.
This
is triggered consistently by the MHEG renderer which deletes the old UI
elements before re-painting the page again (and there is at least one
lock not used which would minimise but not avoid the impact).

So when the painter is deleted, we reset the parent for any UI elements
that have not released their resources and refresh the parent when the
new painter is subsequently used to render the UI (so that the new
painter is called when the MythImage? is finally deleted).

There is some additional locking still required in MythPlayer? for
absolute safety.

N.B. I will probably revert this code if it does not work as intended.


Modified:

   branches/release-0-24-fixes/mythtv/libs/libmythui/mythimage.h
   branches/release-0-24-fixes/mythtv/libs/libmythui/mythpainter.cpp
   branches/release-0-24-fixes/mythtv/libs/libmythui/mythpainter_d3d9.cpp
   branches/release-0-24-fixes/mythtv/libs/libmythui/mythpainter_ogl.cpp
   branches/release-0-24-fixes/mythtv/libs/libmythui/mythpainter_vdpau.cpp




More information about the mythtv-commits mailing list