[mythtv-commits] mythtv/master commit: e949f5fe9 by Mark Kendall (mark-kendall)

MythTV noreply at mythtv.org
Tue Mar 8 12:06:59 UTC 2011


      Author:  Mark Kendall <mkendall at mythtv.org>
 Change Date:  2011-03-08T04:06:42-08:00
   Push Date:  2011/03/08 04:06:55 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  e949f5fe9d9dd267bdeedd1a8de4588c43a1d8ce
   Changeset:  https://github.com/MythTV/mythtv/commit/e949f5fe9

Log:

Refactor the UI Painters.

- Move all shape painting out of MythUIShape and into the painter
classes. This means MythUIShape no longer caches the rendered image and
the individual painter classes are free to optimise/accelerate rendering
as appropriate.

- Clean up the MythPainter interface on the basis of using QBrush and
QPen explicitly in all cases.

- Update MythGuideGrid for API changes (and to a lesser extent
MythUIType)

- Consolidate all text, rectangle, rounded rectangle and ellipse drawing
and cacheing in the base MythPainter class. This essentially means the
base class now handles all CPU based rendering and cacheing with the
derived classes free to implement hardware cacheing (i.e. OpenGL/D3D
textures) and accelerated rendering.

- Use accelerated rendering for basic square rectangles with no gradient
for OpenGL and Direct3D9.

All told, this greatly simplifies the code, should make it a little more
comprehensible, ensures the correct classes are doing the painting and
implements the beginnings of properly accelerated rendering for some
shapes.

A customised theme (using only basic rectangles) should now give, for
example, accelerated OpenGL ES rendering with a small memory footprint
on embedded devices.

Modified:

   mythtv/libs/libmythui/mythpainter.cpp
   mythtv/libs/libmythui/mythpainter.h
   mythtv/libs/libmythui/mythpainter_d3d9.cpp
   mythtv/libs/libmythui/mythpainter_d3d9.h
   mythtv/libs/libmythui/mythpainter_ogl.cpp
   mythtv/libs/libmythui/mythpainter_ogl.h
   mythtv/libs/libmythui/mythpainter_qimage.cpp
   mythtv/libs/libmythui/mythpainter_qimage.h
   mythtv/libs/libmythui/mythpainter_qt.cpp
   mythtv/libs/libmythui/mythpainter_qt.h
   mythtv/libs/libmythui/mythpainter_vdpau.cpp
   mythtv/libs/libmythui/mythpainter_vdpau.h
   mythtv/libs/libmythui/mythpainter_yuva.cpp
   mythtv/libs/libmythui/mythpainter_yuva.h
   mythtv/libs/libmythui/mythuiguidegrid.cpp
   mythtv/libs/libmythui/mythuiguidegrid.h
   mythtv/libs/libmythui/mythuishape.cpp
   mythtv/libs/libmythui/mythuishape.h
   mythtv/libs/libmythui/mythuitype.cpp



More information about the mythtv-commits mailing list