Changeset 846 for trunk/src/opengl/qglpaintdevice.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/opengl/qglpaintdevice.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) … … 49 49 #endif 50 50 51 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)51 #if !defined(QT_OPENGL_ES_1) 52 52 #include <private/qpixmapdata_gl_p.h> 53 #endif54 55 #if defined(QT_OPENGL_ES_1_CL)56 #include "qgl_cl_p.h"57 53 #endif 58 54 … … 68 64 } 69 65 66 int QGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const 67 { 68 switch(metric) { 69 case PdmWidth: 70 return size().width(); 71 case PdmHeight: 72 return size().height(); 73 case PdmDepth: { 74 const QGLFormat f = format(); 75 return f.redBufferSize() + f.greenBufferSize() + f.blueBufferSize() + f.alphaBufferSize(); 76 } 77 default: 78 qWarning("QGLPaintDevice::metric() - metric %d not known", metric); 79 return 0; 80 } 81 } 70 82 71 83 void QGLPaintDevice::beginPaint() … … 164 176 glClearColor(c.redF() * alpha, c.greenF() * alpha, c.blueF() * alpha, alpha); 165 177 } 166 glClear(GL_COLOR_BUFFER_BIT); 178 if (context()->d_func()->workaround_needsFullClearOnEveryFrame) 179 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); 180 else 181 glClear(GL_COLOR_BUFFER_BIT); 167 182 } 168 183 } … … 204 219 break; 205 220 case QInternal::Pixmap: { 206 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)221 #if !defined(QT_OPENGL_ES_1) 207 222 QPixmapData* pmd = static_cast<QPixmap*>(pd)->pixmapData(); 208 223 if (pmd->classId() == QPixmapData::OpenGLClass)
Note:
See TracChangeset
for help on using the changeset viewer.