Changeset 846 for trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 1555 1555 } 1556 1556 } 1557 if (!region.isEmpty()) { 1558 solidFill(d_ptr->backgroundColor, region); 1559 } 1557 1558 solidFill(d_ptr->backgroundColor, region); 1560 1559 1561 1560 while (idx > 0) { … … 1630 1629 Q_UNUSED(region); 1631 1630 #else 1631 QDirectFBScreen::solidFill(d_ptr->primarySurface, color, region); 1632 #endif 1633 } 1634 1635 static inline void clearRect(IDirectFBSurface *surface, const QColor &color, const QRect &rect) 1636 { 1637 Q_ASSERT(surface); 1638 const DFBRegion region = { rect.left(), rect.top(), rect.right(), rect.bottom() }; 1639 // could just reinterpret_cast this to a DFBRegion 1640 surface->SetClip(surface, ®ion); 1641 surface->Clear(surface, color.red(), color.green(), color.blue(), color.alpha()); 1642 } 1643 1644 void QDirectFBScreen::solidFill(IDirectFBSurface *surface, const QColor &color, const QRegion ®ion) 1645 { 1632 1646 if (region.isEmpty()) 1633 1647 return; 1634 1648 1635 d_ptr->primarySurface->SetColor(d_ptr->primarySurface,1636 color.red(), color.green(), color.blue(),1637 color.alpha());1638 1649 const int n = region.rectCount(); 1639 1650 if (n == 1) { 1640 const QRect r = region.boundingRect(); 1641 d_ptr->primarySurface->FillRectangle(d_ptr->primarySurface, r.x(), r.y(), r.width(), r.height()); 1651 clearRect(surface, color, region.boundingRect()); 1642 1652 } else { 1643 1653 const QVector<QRect> rects = region.rects(); 1644 QVarLengthArray<DFBRectangle, 32> rectArray(n);1645 1654 for (int i=0; i<n; ++i) { 1646 const QRect &r = rects.at(i); 1647 rectArray[i].x = r.x(); 1648 rectArray[i].y = r.y(); 1649 rectArray[i].w = r.width(); 1650 rectArray[i].h = r.height(); 1651 } 1652 d_ptr->primarySurface->FillRectangles(d_ptr->primarySurface, rectArray.constData(), n); 1653 } 1654 #endif 1655 clearRect(surface, color, rects.at(i)); 1656 } 1657 } 1658 surface->SetClip(surface, 0); 1655 1659 } 1656 1660 … … 1791 1795 #endif 1792 1796 1793 #ifndef QT_DIRECTFB_PLUGIN1794 1797 Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_widget(const QWidget *widget, QRect *rect) 1795 1798 { … … 1809 1812 1810 1813 #endif 1811 #endif1812 1814 1813 1815 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.