Ticket #2412: 2412-v1.patch

File 2412-v1.patch, 3.0 KB (added by danielk, 5 years ago)

Backport of [11327] and [11364] to 0.20-fixes

  • libs/libmythtv/osdsurface.h

     
    2424 
    2525    void Clear(void); 
    2626    void ClearUsed(void); 
     27    bool IsClear(void) const; 
    2728 
    2829    bool IntersectsDrawn(QRect &newrect); 
    2930    void AddRect(QRect &newrect); 
     
    3536        if (change)  
    3637            ++revision; 
    3738    } 
    38     int GetRevision() { return revision; } 
     39    int GetRevision(void) const { return revision; } 
    3940 
    4041    void BlendToYV12(unsigned char *yptr, 
    4142                     unsigned char *uptr, 
  • libs/libmythtv/osd.h

     
    6060 
    6161    OSDSurface *Display(void); 
    6262 
     63    int  GetRevision(void) const; 
     64 
    6365    void ClearAll(const QString &name); 
    6466    void ClearAllText(const QString &name); 
    6567    void SetText(const QString &name, QMap<QString, QString> &infoMap, 
  • 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(); 
    2863         if (osdsurf) 
    2864             xvmc_osd->SetRevision(osdsurf->GetRevision()); 
     2862        xvmc_osd->SetRevision(osd->GetRevision()); 
    28652863        if (ret >= 0 && xvmc_osd->NeedFrame()) 
    28662864        { 
    28672865            // If there are no available buffer, try to toss old 
  • libs/libmythtv/osdsurface.cpp

     
    135135    usedRegions = QRegion(); 
    136136} 
    137137 
     138bool OSDSurface::IsClear(void) const 
     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; 
  • libs/libmythtv/osd.cpp

     
    24742474    totalfadetime = 0; 
    24752475} 
    24762476 
     2477int OSD::GetRevision(void) const 
     2478{ 
     2479    if (drawSurface) 
     2480        return drawSurface->GetRevision(); 
     2481    return 0; 
     2482} 
     2483 
    24772484OSDSurface *OSD::Display(void) 
    24782485{ 
    24792486    bool anytodisplay = false; 
     
    25452552 
    25462553    m_setsvisible = anytodisplay; 
    25472554 
    2548     if (m_setsvisible) 
     2555    if (m_setsvisible && !drawSurface->IsClear()) 
    25492556        return drawSurface; 
    25502557 
    25512558    return NULL;