summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-261-1/+1
|\ | | | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * Fix off-by-one error in mipmap count when loading PVRTC filesRhys Weatherley2010-02-241-1/+1
| | | | | | | | | | Task-number: QT-2988 Reviewed-by: Julian de Bhal
* | Remove comment in drawStaticTextItem() in GL engineEskil Abrahamsen Blomfeldt2010-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | Removing this comment, as a decision was made. QStaticText is an optimization class. Forcing a fallback for all fonts over a certain size would be to intrusive. People should get to decide for themselves whether to cache the text or not when using QStaticText. They can always fall back to drawText() themselves. Reviewed-by: TrustMe
* | Made the qDrawPixmaps() API public (with modifications).Trond Kjernåsen2010-02-232-25/+29
| | | | | | | | | | | | | | | | | | QPainter has now gotten a drawPixmapFragments() function together with a Fragment class that describes how each pixmap fragment is supposed to be drawn. Reviewed-by: Gunnar Reviewed-by: Samuel
* | Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-2010-84/+333
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp
| * \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml into ↵Qt Continuous Integration System2010-02-191-1/+3
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-qml: (81 commits) Revert "Speed up QmlGraphicsItem::setParentItem." Fix dynamic example More strict type checking of ListElement properties. Fix tst_QmlGraphicsLoader::networkRequestUrl autotest. Fix tst_qmlgraphicstextedit::delegateLoading autotest Delete the QmlImageRequestHandler in the correct thread. Fix "AnimatedImage ignores Anchors setting" Remove unused function that breaks build on AIX. doc Add support for startDragDistance in qmlviewer. Add pixmap benchmarks and make cached rounded rect the same as Rectangle. Make QmlDom API internal Compile fix with namepaces Doc: reformulate why we build a button Removed incorrect Q_UNUSED() macro from QmlPropertyAnimation::transition Doc: onExited, onEntered only work when button pressed or hoverEnabled Ensure visibleIndex and currentIndex are updated on itemsMoved(). QmlView API review. See QmlChanges.txt for details. Fix example after introduction of RotationAnimation. Animation doc fix. ...
| | * \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtMartin Jones2010-02-184-10/+9
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/linux-g++-x11egl/qplatformdefs.h src/declarative/qml/qmldom.h src/declarative/util/qmlview.cpp src/declarative/util/qmlview.h tools/qdoc3/cppcodemarker.cpp tools/qmldebugger/standalone/canvasframerate.cpp tools/qmldebugger/standalone/engine.cpp tools/qmldebugger/standalone/expressionquerywidget.cpp tools/qmldebugger/standalone/expressionquerywidget.h tools/qmldebugger/standalone/objectpropertiesview.cpp tools/qmldebugger/standalone/objectpropertiesview.h tools/qmldebugger/standalone/objecttree.cpp tools/qmldebugger/standalone/qmldebugger.cpp tools/qmldebugger/standalone/watchtable.cpp tools/qmldebugger/standalone/watchtable.h
| | * | | MOBILITY-404 QS Windows.Wolfgang Beck2010-02-161-1/+3
| | | | |
| * | | | Merge remote branch 'qt/master' into staging-2-masterQt Continuous Integration System2010-02-184-10/+9
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/assistant/tools/assistant/helpviewer_qtb.h tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h
| * | | | Fix warnings on gccEskil Abrahamsen Blomfeldt2010-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc warns if declaration and initialization order are different. Reviewed-by: Samuel
| * | | | Add experimental VBO support for drawCachedGlyphs()'s index arrayEskil Abrahamsen Blomfeldt2010-02-182-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is disabled by default, but included for testing on different platforms. Intuition implies that caching the index array in a VBO should be a performance improvement, but so far our tests do not confirm this. Reviewed-by: Gunnar
| * | | | Optimization for text drawing on OpenGLEskil Abrahamsen Blomfeldt2010-02-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only call glBindTexture() if the glyph cache texture is not already bound. This can potentially give performance improvement of around 30%. Reviewed-by: Gunnar
| * | | | Some threading improvements to the GL moduleGunnar Sletta2010-02-173-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make bindTexture threadsafe - Document which areas of QGLWidget needs locking in order to do out-of-gui thread rendering - Testcases to prove that these cases work Reviewed-by: Trond
| * | | | Fix alpha check for OpenGL/ES in GL2 paint engineRhys Weatherley2010-02-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL_RGB5 and GL_RGB8 don't exist on OpenGL/ES systems. Reviewed-by: Julian de Bhal
| * | | | Merge remote branch 'qt/master' into staging-2-masterQt Continuous Integration System2010-02-152-2/+13
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | Conflicts: tests/auto/qlineedit/tst_qlineedit.cpp
| * | | | Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7Eskil Abrahamsen Blomfeldt2010-02-1525-448/+4823
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Make QStaticText public API againEskil Abrahamsen Blomfeldt2010-02-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Revert 004b09ffd423cd3100e346825dd7d730fc86d366Eskil Abrahamsen Blomfeldt2010-02-101-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changing the height here will make the coords out of sync with the ' buffer, causing broken drawing. I revert this change to prepare QStaticText for integration, and will revisit it later on.
| * | | | | Merge branch 'qstatictext-4.6' of ↵Eskil Abrahamsen Blomfeldt2010-02-101-1/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | git@scm.dev.nokia.troll.no:qt/qt-graphics-team into qstatictext-4.6
| | * | | | | Make the GL glyph cache a POT textureEskil Abrahamsen Blomfeldt2010-02-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a significant speed-up on some architectures and drivers.
| * | | | | | Merge branch '4.6' into qstatictext-4.6Eskil Abrahamsen Blomfeldt2010-02-103-3/+4
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | Use glDrawElements and triangle strips to draw glyphs in GL engineEskil Abrahamsen Blomfeldt2010-02-093-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep around a engine-global index array which we only grow when we need to. This should hopefully speed up text drawing on some devices.
| * | | | | | Remove VBO caching and glDrawElements path in QStaticTextEskil Abrahamsen Blomfeldt2010-02-081-124/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glDrawElements needs to be handled properly, using triangle strips rather than triangle lists, so the code has been removed for now. The VBO caching did not gain us any particular performance. We rather cache the client-side buffers for the same speed-up but with less clean-up complexity.
| * | | | | | Clean up VBOs cached in QStaticText when context is deletedEskil Abrahamsen Blomfeldt2010-02-051-18/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow pattern from qpaintengine_opengl.cpp and listen for the destroyed signal of the GL context. If the context that owns the VBOs is deleted, then we delete the VBOs as well.
| * | | | | | Add explanatory comment to QGL2PaintEngineExPrivate::drawCachedGlyphsEskil Abrahamsen Blomfeldt2010-02-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A small hack to turn off the current matrix when drawing QStaticText, since its coordinates are already transformed.
| * | | | | | Recreate cached vertex arrays for QStaticText when drawn to new contextEskil Abrahamsen Blomfeldt2010-02-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you draw the QStaticText object to a new QGLWidget, then we need to recreate the VBOs (if the vertex arrays are cached.) It would be possible to share this across contexts, which can be implemented later as an extra optimization for switching between different target devices.
| * | | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Eskil Abrahamsen Blomfeldt2010-02-043-1/+7
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | qstatictext-4.6
| * | | | | | | Small optimization for QStaticText when used with index arraysEskil Abrahamsen Blomfeldt2010-02-041-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't recalculate the index array when the glyphs are simply moved.
| * | | | | | | Fix broken text drawing in OpenGL engine when text items are too longEskil Abrahamsen Blomfeldt2010-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing text through drawElements introduced a bug when text items exceeded the range of GLubyte (seen in textedit demo.)
| * | | | | | | Add experimental support for using drawElements to draw cached textEskil Abrahamsen Blomfeldt2010-02-021-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to some design documents, drawElements() is likely to be quicker on some devices, as the driver then does not have to create the index array. To test the impact of this, we cache use drawElements and cache the index array in QStaticText
| * | | | | | | Merge branch '4.6' into qstatictext-4.6Eskil Abrahamsen Blomfeldt2010-02-0114-394/+522
| |\ \ \ \ \ \ \
| * | | | | | | | Fix transformed painting of QStaticText in GL2 paint engineEskil Abrahamsen Blomfeldt2010-02-012-8/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL2 paint engine was rewritten to use GL to transform glyphs when copying them from the glyph cache instead of keeping a separate cache for different transformations. Since the glyph positions in QStaticText already include the transformation, we need to run the gl calls with an identity matrix, otherwise the position of the glyphs will be transformed twice. The output from drawText() and drawStaticText() will for the same reason look different for the two different engines. The option here is to detect the problem when drawing to the opengl2 engine, and then recalculating the glyph positions for the QStaticText. This will of course create a big overhead when regularly switching between different paint devices, but it might make sense to optimize for one QStaticText per paint device. For the time being I haven't done that, though, since that change would require a bigger hack, so it warrants deeper consideration.
| * | | | | | | | Make QStaticText private APIEskil Abrahamsen Blomfeldt2010-02-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | Compile on WindowsEskil Abrahamsen Blomfeldt2010-02-011-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default GL header on Windows is GL 1.1, so the 1.5 extensions are not defined. To work around this, we define the macros when needed. The macros are required for QStaticText's OpenGL backend.
| * | | | | | | | Remove reference to _ARB macrosEskil Abrahamsen Blomfeldt2010-02-011-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These belong to an OpenGL extension which is not in use.
| * | | | | | | | Improve performance of QStaticText on OpenGL by caching data on GPUEskil Abrahamsen Blomfeldt2010-01-291-10/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a big improvement to be seen in the OpenGL engine by caching the vertex data for the QStaticText in VBOs. In order to have the buffers properly disposed, I've implemented a userdata concept for QStaticTextItem. By default, the optimizations will be turned off, and can be turned on by using the useBackendOptimizations flag.
| * | | | | | | | Inline QGL2PEXVertexArray::addRect()Eskil Abrahamsen Blomfeldt2010-01-192-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimization for drawStaticText()
| * | | | | | | | Optimize speed of QGL2PEXVertexArrayEskil Abrahamsen Blomfeldt2010-01-191-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is the main performance hog when using QStaticText with the OpenGL engine, so I've improved on it a little by removing the conversion from (qreal,qreal) -> QPointF -> QGLPoint. Since the function is called so often, it has an impact on drawStaticText().
| * | | | | | | | CompileEskil Abrahamsen Blomfeldt2010-01-153-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some errors introduced by merges.
| * | | | | | | | CompileEskil Abrahamsen Blomfeldt2010-01-142-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the code to compile with merged changes.
| * | | | | | | | Implement drawStaticTextItem() in OpenGL paint enginesEskil Abrahamsen Blomfeldt2010-01-144-54/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | | Support transformations in drawStaticText() and optimize for spaceEskil Abrahamsen Blomfeldt2010-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Support transformations on the painter in drawStaticText(). Transforming the painter will cause the text layout to be recalculated, except for translations, which are handled by shifting the position of the text items. 2. Make const length arrays of the internal data in QStaticTextItem in order to minimize the memory consumption.
| * | | | | | | | Optimize QStaticText for spaceEskil Abrahamsen Blomfeldt2010-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By caching the results of getGlyphPositions() we can make a code path in the critical paint engines which is optimal both in space and speed. The engines where speed is of less importance (pdf engine etc.) which may need more information, we choose the slower code path of drawText() which lays out the text again. We should have optimal paths in raster, vg and GL2 paint engines. The others are less important. Memory consumption of static text is now 14 bytes per glyph, 8 bytes per item and a static overhead of 40 bytes per QStaticText object.
* | | | | | | | | Merge remote branch 'origin/4.6' into qt-master-from-4.6Thiago Macieira2010-02-201-1/+3
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/Makefile.unix qmake/generators/symbian/symmake.cpp
| * | | | | | | | Fix building in a namespace on WindowsAndy Shaw2010-02-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: hjk
* | | | | | | | | Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-184-10/+9
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qtextcodec.h tests/auto/gestures/tst_gestures.cpp
| * | | | | | | | Fix copyright year.Jason McDonald2010-02-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | | | | | | doc: Fixed some qdoc errors.Martin Smith2010-02-162-7/+6
| | | | | | | | |
| * | | | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-131-1/+1
| |\ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (28 commits) Optimized QLocale to access system locale on demand. Fix QRegion under Mac OS X. update according to Thiago's comments. Changes: add functionality for dbus auto start to qt Add license header to this file readdir64 is not available on HP-UX Fix bug in QDirPrivate::setPath, affecting QDir::cd, cdUp and setPath qdoc3: Completed handling of the new \pagekeywords command. Wrong cursor shown by the parent window after setOverrideCursor(). Fixed Mac OS X compile time error by using GLint for temp. qdoc3: Added curly braces in switch statement for braindead compiler. qdoc: Added a build rule for the documentation - disabled by default. Doc: Added the qdoc manual to the repository for future maintenance. qdoc3: Fixed bug in creation of qt.pageindex. qdoc3: Added capability to create qt.pageindex. Incorrect property setter generated by dumpcpp for Microsoft Word 2007. Cocoa: Implement our own NSApplication subclass Cocoa: Menu in menubar stays highlighted qdoc: Made a temporary fix for comment highlighting. Doc: Tidied up the class layout and removed an unnecessary image. ...
| | * | | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-121-1/+1
| | |\ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (27 commits) Fix QRegion under Mac OS X. update according to Thiago's comments. Changes: add functionality for dbus auto start to qt Add license header to this file readdir64 is not available on HP-UX Fix bug in QDirPrivate::setPath, affecting QDir::cd, cdUp and setPath qdoc3: Completed handling of the new \pagekeywords command. Wrong cursor shown by the parent window after setOverrideCursor(). Fixed Mac OS X compile time error by using GLint for temp. qdoc3: Added curly braces in switch statement for braindead compiler. qdoc: Added a build rule for the documentation - disabled by default. Doc: Added the qdoc manual to the repository for future maintenance. qdoc3: Fixed bug in creation of qt.pageindex. qdoc3: Added capability to create qt.pageindex. Incorrect property setter generated by dumpcpp for Microsoft Word 2007. Cocoa: Implement our own NSApplication subclass Cocoa: Menu in menubar stays highlighted qdoc: Made a temporary fix for comment highlighting. Doc: Tidied up the class layout and removed an unnecessary image. Doc/qdoc: Use Chinese titles; canonicalize titles with non-ASCII chars. ...