summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-27 06:37:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-27 06:37:04 (GMT)
commitb371f77f765d140c7d2a57d99405978f89561494 (patch)
treecec4c4d3df2e34804c44e68d8bb673c4a72011a8 /src
parent0ec3281f7deb9a0c5bdc26481bf5c0fb8d3ae750 (diff)
parent525fb40e868dbc507165155590c9cb831e2b25f9 (diff)
downloadQt-b371f77f765d140c7d2a57d99405978f89561494.zip
Qt-b371f77f765d140c7d2a57d99405978f89561494.tar.gz
Qt-b371f77f765d140c7d2a57d99405978f89561494.tar.bz2
Merge branch 'staging' into 4.7-integration
* staging: fix documentation of drawText(int, int, int, int, ... Don't pretend to support single buffered EGL surfaces. Named anonymous struct in the OpenGL paint engine. Fixes gray_raster incorrectly reporting out of memory error.
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qgrayraster.c4
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/opengl/qgl.cpp3
-rw-r--r--src/opengl/qgl_egl.cpp1
-rw-r--r--src/opengl/qpaintengine_opengl.cpp4
5 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c
index 94039fb..19cef49 100644
--- a/src/gui/painting/qgrayraster.c
+++ b/src/gui/painting/qgrayraster.c
@@ -324,6 +324,7 @@
{
void* buffer;
long buffer_size;
+ long buffer_allocated_size;
int band_size;
void* memory;
PWorker worker;
@@ -1767,7 +1768,7 @@
// If raster object and raster buffer are allocated, but
// raster size isn't of the minimum size, indicate out of
// memory.
- if (raster && raster->buffer && raster->buffer_size < MINIMUM_POOL_SIZE )
+ if (raster->buffer_allocated_size < MINIMUM_POOL_SIZE )
return ErrRaster_OutOfMemory;
/* return immediately if the outline is empty */
@@ -1906,6 +1907,7 @@
rast->buffer_size = 0;
rast->worker = NULL;
}
+ rast->buffer_allocated_size = pool_size;
}
}
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 12be93e..376d68b 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -6185,7 +6185,7 @@ void QPainter::drawText(const QRectF &r, int flags, const QString &str, QRectF *
By default, QPainter draws text anti-aliased.
- \note The y-position is used as the baseline of the font.
+ \note The y-position is used as the top of the font.
\sa Qt::AlignmentFlag, Qt::TextFlag
*/
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 0d1a66e..b678790 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -509,6 +509,9 @@ QGLFormat::~QGLFormat()
exchange the screen contents with the buffer. The result is
flicker-free drawing and often better performance.
+ Note that single buffered contexts are currently not supported
+ with EGL.
+
\sa doubleBuffer(), QGLContext::swapBuffers(),
QGLWidget::swapBuffers()
*/
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index ebd1169..c79c4cd 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -143,6 +143,7 @@ void qt_glformat_from_eglconfig(QGLFormat& format, const EGLConfig config)
format.setRgba(true); // EGL doesn't support colour index rendering
format.setStereo(false); // EGL doesn't support stereo buffers
format.setAccumBufferSize(0); // EGL doesn't support accululation buffers
+ format.setDoubleBuffer(true); // We don't support single buffered EGL contexts
// Clear the EGL error state because some of the above may
// have errored out because the attribute is not applicable
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 58778ea..2f17aa6 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -506,12 +506,12 @@ struct QDrawQueueItem
////////// GL program cache: start
-typedef struct {
+struct GLProgram {
int brush; // brush index or mask index
int mode; // composition mode index
bool mask;
GLuint program;
-} GLProgram;
+};
typedef QMultiHash<const QGLContext *, GLProgram> QGLProgramHash;