Changeset 846 for trunk/src/gui/painting/qwindowsurface.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/gui/painting/qwindowsurface.cpp
r651 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) … … 44 44 #include <private/qwidget_p.h> 45 45 #include <private/qbackingstore_p.h> 46 #include <private/qapplication_p.h> 46 47 47 48 QT_BEGIN_NAMESPACE … … 50 51 { 51 52 public: 52 QWindowSurfacePrivate(QWidget *w) : window(w), staticContentsSupport(false) {} 53 QWindowSurfacePrivate(QWidget *w) 54 : window(w) 55 , staticContentsSupport(0) 56 , partialUpdateSupport(1) 57 { 58 } 53 59 54 60 QWidget *window; … … 56 62 QRegion staticContents; 57 63 QList<QImage*> bufferImages; 58 bool staticContentsSupport; 64 uint staticContentsSupport : 1; 65 uint partialUpdateSupport : 1; 59 66 }; 60 67 … … 111 118 : d_ptr(new QWindowSurfacePrivate(window)) 112 119 { 113 if (window) 114 window->setWindowSurface(this); 120 if (!QApplicationPrivate::runtime_graphics_system) { 121 if(window) 122 window->setWindowSurface(this); 123 } 115 124 } 116 125 … … 285 294 void QWindowSurface::setStaticContentsSupport(bool enable) 286 295 { 296 if (enable && !d_ptr->partialUpdateSupport) { 297 qWarning("QWindowSurface::setStaticContentsSupport: static contents support requires partial update support"); 298 return; 299 } 287 300 d_ptr->staticContentsSupport = enable; 288 301 } … … 301 314 { 302 315 return d_ptr->staticContentsSupport && !d_ptr->staticContents.isEmpty(); 316 } 317 318 bool QWindowSurface::hasPartialUpdateSupport() const 319 { 320 return d_ptr->partialUpdateSupport; 321 } 322 323 void QWindowSurface::setPartialUpdateSupport(bool enable) 324 { 325 if (!enable && d_ptr->staticContentsSupport) { 326 qWarning("QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support"); 327 return; 328 } 329 d_ptr->partialUpdateSupport = enable; 303 330 } 304 331
Note:
See TracChangeset
for help on using the changeset viewer.