diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-07-02 07:41:40 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-07-02 08:05:37 (GMT) |
commit | ef9fad3391f7b5c59d3fe62b491a4760c2917810 (patch) | |
tree | c574b08cbe0504dacd2f6f021d74e10c39a94a54 /src/opengl/qpixmapdata_gl_p.h | |
parent | f86a6467c0dbfd54603b588e6c001265b0d527e3 (diff) | |
download | Qt-ef9fad3391f7b5c59d3fe62b491a4760c2917810.zip Qt-ef9fad3391f7b5c59d3fe62b491a4760c2917810.tar.gz Qt-ef9fad3391f7b5c59d3fe62b491a4760c2917810.tar.bz2 |
Refactored the GL QPixmap backend to use an FBO pool class.
The FBO pool will be useful in other places as well, plus it makes it
easier to deal with graphics memory management issues.
Diffstat (limited to 'src/opengl/qpixmapdata_gl_p.h')
-rw-r--r-- | src/opengl/qpixmapdata_gl_p.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index a6aa22d..aaeb8ac 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -61,6 +61,19 @@ QT_BEGIN_NAMESPACE class QPaintEngine; class QGLFramebufferObject; +class QGLFramebufferObjectFormat; + +class QGLFramebufferObjectPool +{ +public: + QGLFramebufferObject *acquire(const QSize &size, const QGLFramebufferObjectFormat &format); + void release(QGLFramebufferObject *fbo); + +private: + QList<QGLFramebufferObject *> m_fbos; +}; + +QGLFramebufferObjectPool* qgl_fbo_pool(); class QGLPixmapData : public QPixmapData { |