summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Fix static build on Windows with MinGW.Mark Brand2011-01-171-1/+1
| | | | | | | | | | | | | | | | | Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. Commit edbc656b changed Q_DECL_IMPORT_IMPORT to Q_CORE_EXPORT when declaring QtCore functions in svg. Now we change Q_DECL_IMPORT to Q_GUI_EXPORT when declaring QtGui functions into opengl and openvg. Also removed the redundant keyword "extern" from the function declarations. Merge-request: 2540 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: mariusSO
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Fix possible crash in QStaticText and QDeclarativeTextLayoutEskil Abrahamsen Blomfeldt2010-10-291-4/+4
| | | | | | | | | | | | | The QStaticTextItem held an uncounted reference to QFontEngine. The pointer would dangle in some cases where there was no font object referencing the engine and the cache was cleaned out (e.g. when a new application font is added.) Properly count the reference, and also add reference counting to userData to make it harder to shoot yourself in the foot, since the QStaticTextItem class is now being used in different places, Task-number: QTBUG-14446 Reviewed-by: Martin Jones
* Functions that are externally defined to QtOpenGL needs to be imported.Jani Hautakangas2010-10-211-1/+1
| | | | | | This is needed for RVCT4 Reviewed-by: Jason Barron
* Named anonymous struct in the OpenGL paint engine.Kim Motoyoshi Kalland2010-09-241-2/+2
| | | | | Task-number: QTBUG-13926 Reviewed-by: Gunnar
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-09-211-3/+5
|\
| * Prevent crash in QGLGlyphCache due to dangling context references.Samuel Rødal2010-09-141-3/+5
| | | | | | | | | | | | | | | | We need to clear the context from the cache when it's destroyed even if it doesn't belong to a widget. Task-number: QTBUG-13622 Reviewed-by: Trond
* | Fixes QPen dash offset for OpenGL paint engines (1.x & 2.x).Yoann Lopes2010-09-201-0/+1
| | | | | | | | | | Task-number: QTBUG-13409 Reviewed-by: Trond
* | Fixed compilation of QtOpenGL.Samuel Rødal2010-05-271-1/+1
| | | | | | | | Reviewed-by: Eskil
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * Fixed an issue with pixmaps not being released correctly in the GL 1 engine.Trond Kjernåsen2010-05-101-0/+5
| | | | | | | | | | | | | | | | | | | | When a pixmap is bound using the texture_from_pixmap extension we retain a reference to the pixmap to stop us destroying it before swapBuffers() or glFlush() is called. The references were not cleared out correctly in the GL 1 engine. Task-number: QTBUG-10529 Reviewed-by: Samuel
* | Compile fix on Windows.Kim Motoyoshi Kalland2010-05-121-1/+1
| | | | | | | | Reviewed-by: Trond
* | Avoid many unnecessary allocations, so so that paint engines attached to pixmapsWarwick Allison2010-05-071-0/+3
| | | | | | | | | | | | | | | | | | do not consume excessive amounts of memory, and so can still be reasonably kept cached with the pixmap. Saves 8K for every pixmaps drawn to on raster paint engine. Saves about 2K for other graphicssystems. Task-number: QTBUG-10215 Reviewed-by: Gunnar
* | Compile Qt in C++0x mode.Thiago Macieira2010-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This is not valid in C++0x: char str[] = { 128, 0 }; Because 128 cannot be represented in a char. The same applies to conversion from int to qreal: it's a narrowing conversion, with possible data loss. More info: http://www2.research.att.com/~bs/C++0xFAQ.html#narrowing Reviewed-by: Trust Me
* | Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7Eskil Abrahamsen Blomfeldt2010-02-151-102/+95
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7 Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7 Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp
| * | Remove obsolete OpenGL/ES CommonLite (fixed-point) supportRhys Weatherley2010-02-041-102/+95
| |/ | | | | | | | | Task-number: QTBUG-7683 Reviewed-by: Tom Cooksey
* | Make QStaticText public API againEskil Abrahamsen Blomfeldt2010-02-101-1/+1
| | | | | | | | | | QStaticText was previously made private API to support inclusion in Qt 4.6.x. This change turns it back into public API for Qt 4.7.0.
* | Make QStaticText private APIEskil Abrahamsen Blomfeldt2010-02-011-1/+1
| | | | | | | | | | | | | | | | Turns QStaticText into private API in preparation for Qt 4.6.x. The related functions in QPainter are marked as internal in the docs. There are already internal functions in QPainter, so this seemed like a reasonable solution. Since the functions require QStaticText they will not be accessible to anyone who does not include private API.
* | CompileEskil Abrahamsen Blomfeldt2010-01-151-1/+1
| | | | | | | | Some errors introduced by merges.
* | CompileEskil Abrahamsen Blomfeldt2010-01-141-1/+1
| | | | | | | | Update the code to compile with merged changes.
* | Implement drawStaticTextItem() in OpenGL paint enginesEskil Abrahamsen Blomfeldt2010-01-141-38/+58
|/ | | | | | | | | | | | The OpenGL and OpenGL2 engines now have support for static text, as well as the QEmulationPaintEngine. Also contains an optimization: Instead of passing both the position and glyph positions to drawStaticTextItem() we add the position into the glyph position and update it only when it changes. Otherwise we would have to do this work in all engines for every call. This means we have to cache the position in QStaticTextPrivate as well, but it seems like a small price to pay, since it's a per-text overhead and only 16 bytes.
* Rework how Qt handles GL extensions.Trond Kjernåsen2010-01-131-13/+33
| | | | | | | | | | | | | | | | | | Qt used to store the GL extensions a particular implementation supported in a global cache, which was initialized once and never updated. This could cause problems because different types of context might support different kinds of extensions (e.g. the difference between sw and hw contexts). With this patch, the GL extensions are cached and updated within each QGLContext. It also makes the extension initialization lazy, which saves application initialization costs for embedded platforms. The patch introduces a internal cross platform QGLTemporaryContext class that is used to create a light-weight GL context without going via QGLWidget and friends (QWS and WinCE still have QGLWidget fallbacks for now). Reviewed-by: Kim Reviewed-by: Samuel
* Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-1/+1
|\ | | | | | | | | Conflicts: dist/changes-4.6.1
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fixed justify aligned text drawing with the GL1 engine.Kim Motoyoshi Kalland2010-01-111-1/+2
|/ | | | | | | | The text was blurry because it wasn't pixel aligned. Fixed by using nearest-neighbour texture filtering when using only translations on the painter. Reviewed-by: Trond
* Merge branch '4.5' into 4.6-stagingThiago Macieira2009-12-261-3/+11
|\ | | | | | | | | Conflicts: tests/benchmarks/benchmarks.pro
| * Fix memory leak of QGLGlyphCoord objects in the OpenGL1 paint engineRhys Weatherley2009-12-201-3/+11
| | | | | | | | | | Task-number: QTBUG-6936 Reviewed-by: Julian de Bhal
* | Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Rhys Weatherley2009-12-061-5/+1
|\ \ | |/
| * Replace glColor4ub() calls with glColor4f()Rhys Weatherley2009-12-061-5/+1
| | | | | | | | | | | | | | | | | | | | Intel Q45/Q43 Express Chipset has problems with glColor4ub() not updating GL_CURRENT_COLOR correctly. Replace all references with calls to glColor4f() instead as it is more likely to be implemented correctly on all chipsets. Task-number: QTBUG-6217 Reviewed-by: Sarah Smith
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Ran the script utils/normalizeOlivier Goffart2009-11-181-10/+10
| | | | | | | | Over src/ tools/ examples/ and demos/
* | Fixed a stencil clearing bug in the GL 1 engine.Trond Kjernaasen2009-10-201-19/+21
| | | | | | | | | | | | | | | | If the system clip changed the stencil buffer wasn't necessarily updated correctly. Use a region to keep track of the dirty areas in the stencil buffer, like we do in the GL 2 engine. Reviewed-by: Samuel
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-191-1/+0
|\ \
| * | Remove unnecessary QWSGLPaintDevice now that we have QGLPaintDeviceRhys Weatherley2009-10-151-1/+0
| | | | | | | | | | | | Reviewed-by: Tom
* | | Fixed bitmap brushes and tiled bitmaps in the OpenGL1 paint engine.Kim Motoyoshi Kalland2009-10-151-2/+12
| | | | | | | | | | | | | | | | | | | | | Fixed drawing of bitmap brushes and tiled bitmaps so that they are painted with the brush colour or pen colour instead of black. Reviewed-by: Trond
* | | Fixed handling of brush origin in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-131-7/+8
|/ / | | | | | | | | | | | | | | Fixed the OpenGL paint engines so that the brush origin is applied correctly and for all brushes just like in the raster paint engine. Task-number: QTBUG-2676 Reviewed-by: Trond
* | Update systemclip based on the correct parametersGunnar Sletta2009-10-051-1/+1
| | | | | | | | Reviewed-by: Samuel
* | QGLContext::areSharing() to check for GL share relationshipsRhys Weatherley2009-10-011-5/+5
| | | | | | | | Reviewed-by: Samuel
* | Make QPF's implementation of alphaMapForGlyph() consistent.Rhys Weatherley2009-09-291-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPF implementation of alphaMapForGlyph() was returning color values of RGBA = (a, a, a, 255) instead of (0, 0, 0, a), which was inconsistent with all the other font engines. This inconsistency caused some QPF-specific workarounds in the OpenGL and OpenVG paint engines. This change removes the workarounds and makes QPF generate the right colors from the start. Paint engines that ignore the color table or which don't use the alphaMapForGlyph() function (e.g. raster) are not affected. Reviewed-by: Paul
* | Removed GL1 pixmap filters and ported colorize filter to GL2 engine.Samuel Rødal2009-09-151-14/+0
| | | | | | | | | | | | | | | | The GL1 engine will use the raster fall back for pixmap filters. We anyhow use GLSL for the filters, which requires OpenGL 2 support, and in that case the GL2 engine is the default. Reviewed-by: Gunnar Sletta
* | Fix font glyph handling for QPF fonts in the OpenGL1 paint engine.Rhys Weatherley2009-09-101-1/+18
| | | | | | | | | | | | | | | | | | Text drawing on OpenGL/ES 1.1 systems using QPF was displaying filled boxes in place of the character glyphs. This is due to the QPF implementation of alphaMapForGlyph() returning a different color table than that expected by QGLGlyphCache::cacheGlyphs(). Reviewed-by: Sarah Smith
* | Suppress warnings in QtOpenGL on OpenGL/ES 1.1 systemsRhys Weatherley2009-09-091-1/+4
| | | | | | | | Reviewed-by: trustme
* | Fixed a bug in the GL1 engine when using a QBrush(Qt::NoBrush) as a pen.Trond Kjernåsen2009-09-091-1/+1
| | | | | | | | | | | | | | This bug was exposed by a change in the QSvg module, and it fixes the framebufferobject and pbuffers2 GL examples. Reviewed-by: Kim
* | Made GL1 engine have proper y-rotation since qgldrawable refactorGunnar Sletta2009-09-091-9/+21
| | | | | | | | Reviewed-by: Tom
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-09-091-66/+66
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qgl_p.h src/opengl/qpaintengine_opengl.cpp
| * | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | | | | | Reviewed-by: Trust Me
| * | Clean up the gradient cache in the right contextRhys Weatherley2009-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGLGradientCache for the OpenGL1 paint engine has to destroy the cached gradient textures if the QGLContext changes. Problem is, it wasn't changing back to the previous context to destroy those textures. Task-number: 249919 Reviewed-by: Sarah Smith
| * | Cleanup of QGLPaintDevice before it goes inTom Cooksey2009-09-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the last patch in the QGLPaintDevice series. Although previous patches have not been reviewed individually, Samuel's reviewed QGLPaintDevice API and all the changes as the code stands with this patch. Reviewed-by: Samuel
| * | Move buffer clear out of the paint engine and into the QGLPaintDevicesTom Cooksey2009-09-081-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the paint engine cleared the surface's buffers in begin. This logic really belongs in QGLPaintDevice::beginPaint as not all paint devices will want this behaviour (in fact most don't). This also makes QGLPaintDevice API much simpler as the virtual getters for the clear color, etc. can be removed. It's much cleaner this way. The only possible problem is with the GL1 engine, which also cleared the accumulation & depth buffers in begin. However, the engine will also clear the depth buffer later as part of it's clipping logic. It also doesn't use the accumulation buffer, so clearing it seems unnessisary.