Ticket #2412: OSD_0-20_Patch.diff

File OSD_0-20_Patch.diff, 2.7 KB (added by bmhowe@…, 14 years ago)

Stop OSD from getting drawn twice (patch to 0.20-fixes)

  • mythtv/libs/libmythtv/osdsurface.h

     
    2424
    2525    void Clear(void);
    2626    void ClearUsed(void);
     27    bool IsClear();
    2728
    2829    bool IntersectsDrawn(QRect &newrect);
    2930    void AddRect(QRect &newrect);
  • mythtv/libs/libmythtv/osd.h

     
    6060
    6161    OSDSurface *Display(void);
    6262
     63    OSDSurface *GetDisplaySurface(void);
     64
    6365    void ClearAll(const QString &name);
    6466    void ClearAllText(const QString &name);
    6567    void SetText(const QString &name, QMap<QString, QString> &infoMap,
  • mythtv/libs/libmythtv/videoout_xv.cpp

     
    28592859        VideoFrame *osdframe = NULL;
    28602860        int ret = DisplayOSD(xvmc_osd->OSDFrame(), osd, -1,
    28612861                             xvmc_osd->GetRevision());
    2862         OSDSurface *osdsurf = osd->Display();
     2862        OSDSurface *osdsurf = osd->GetDisplaySurface();
    28632863        if (osdsurf)
    28642864            xvmc_osd->SetRevision(osdsurf->GetRevision());
    28652865        if (ret >= 0 && xvmc_osd->NeedFrame())
  • mythtv/libs/libmythtv/osdsurface.cpp

     
    135135    usedRegions = QRegion();
    136136}
    137137
     138bool OSDSurface::IsClear(void)
     139{
     140    return (usedRegions == QRegion());
     141}
     142
    138143bool OSDSurface::IntersectsDrawn(QRect &newrect)
    139144{
    140145    QMutexLocker lock(&usedRegionsLock);
     
    799804
    800805        if (startline < 0) startline = 0;
    801806        if (endline >= height) endline = height - 1;
    802         if (startcol < 0) endcol = 0;
     807        if (startcol < 0) startcol = 0;
    803808        if (endcol >= width) endcol = width - 1;
    804809
    805810        unsigned char *src;
  • mythtv/libs/libmythtv/osd.cpp

     
    24742474    totalfadetime = 0;
    24752475}
    24762476
     2477OSDSurface *OSD::GetDisplaySurface(void)
     2478{
     2479    return drawSurface;
     2480}
     2481
    24772482OSDSurface *OSD::Display(void)
    24782483{
    24792484    bool anytodisplay = false;
     
    25452550
    25462551    m_setsvisible = anytodisplay;
    25472552
    2548     if (m_setsvisible)
     2553    if (m_setsvisible && !drawSurface->IsClear())
    25492554        return drawSurface;
    25502555
    25512556    return NULL;