Ticket #3385: opengl_offset_repaint2.patch

File opengl_offset_repaint2.patch, 1.4 KB (added by David Asher <david.asher@…>, 13 years ago)

second version of patch which only allocates the rectangle once

  • libs/libmythui/mythmainwindow.cpp

     
    148148    int screenwidth, screenheight;
    149149
    150150    QRect screenRect;
     151    QRect uiScreenRect;
    151152
    152153    int xbase, ybase;
    153154    bool does_fill_screen;
     
    438439    }
    439440
    440441    if (!d->painter->SupportsClipping())
    441         d->repaintRegion = d->repaintRegion.unite(d->screenRect);
     442        d->repaintRegion = d->repaintRegion.unite(d->uiScreenRect);
    442443
    443444    d->painter->Begin(this);
    444445
     
    449450        if (rects[i].width() == 0 || rects[i].height() == 0)
    450451            continue;
    451452
    452         if (rects[i] != d->screenRect)
     453        if (rects[i] != d->uiScreenRect)
    453454            d->painter->SetClipRect(rects[i]);
    454455
    455456        for (it = d->stackList.begin(); it != d->stackList.end(); ++it)
     
    513514                                d->ybase, d->screenheight, d->hmult);
    514515
    515516    d->screenRect = QRect(d->xbase, d->ybase, d->screenwidth, d->screenheight);
     517    d->uiScreenRect = QRect(0, 0, d->screenwidth, d->screenheight);
    516518
    517519    setGeometry(d->xbase, d->ybase, d->screenwidth, d->screenheight);
    518520    setFixedSize(QSize(d->screenwidth, d->screenheight));
     
    15291531
    15301532QRect MythMainWindow::GetUIScreenRect(void)
    15311533{
    1532     return QRect(0, 0, d->screenwidth, d->screenheight);
     1534    return d->uiScreenRect;
    15331535}
    15341536