summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
Commit message (Collapse)AuthorAgeFilesLines
* Fixed path filling in the GL2 paint engine.Kim Motoyoshi Kalland2009-08-271-1/+1
| | | | | | | | | | The bounding box was not updated for moveTo-commands except the first one. Therefore, the calculated bounding box could be too small for paths with more than one subpath, and when the stencil method was used, parts of the path would not be filled. Task-number: 245803 Reviewed-by: Samuel
* Don't flip texture coords in texture brushes in accordance with new bindTextureGunnar Sletta2009-08-271-1/+0
| | | | Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-08-274-39/+55
|\ | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
| * Made GL 2 engine reset various GL state to their defaults in end().Samuel Rødal2009-08-262-3/+10
| | | | | | | | | | | | | | | | This makes mixing GL and QPainter code safer. We need to be able to assume default GL state in begin(), and set back whatever we change to the default state in end() in the GL 2 paint engine. Reviewed-by: Trond
| * Made brush textures in GL2 engine use correct filtering.Samuel Rødal2009-08-261-8/+10
| | | | | | | | | | | | | | Only use bilinear filtering when SmoothPixmapTransform render hint is used. Reviewed-by: Kim
| * Improved GLSL precision specifiers in GL 2 engine.Samuel Rødal2009-08-261-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recommended specifiers are lowp for colors / normal vectors, mediump for texture coordinates when a limited range is sufficient, and highp for generic texture coordinates and vertex coordinates / transformation matrices. We used to use mediump for texture coordinate in some places, but since we don't control the texturing scenarios we need to handle the worst case, which is zooming in on part of a large texture (2048x2048) with bilinear filtering. To properly handle this case without color banding mediump is probably not sufficient, so we'll use highp for texture coordinates. Reviewed-by: Tom
| * Improved QPainter API for allowing native painting in GL / VG.Samuel Rødal2009-08-262-2/+10
| | | | | | | | | | | | | | | | Previously we were using QPaintEngine::syncState() which is not ideal naming-wise, since it actually prepares for native painting instead of syncing the painter's state to native state. Reviewed-by: Trond
| * Added missing precision specifiers to custom shader effect.Samuel Rødal2009-08-262-2/+2
| | | | | | | | | | | | The precision specifiers need to be there on OpenGL ES 2.0. Reviewed-by: Tom
* | New variant of QGLContext::bindTexture that does not require mipmap generationGunnar Sletta2009-08-271-8/+9
|/ | | | | | | and y-axis inversion and overall less conversion, making significantly faster for plain usecases Reviewed-by: Trond
* Fixed clipping bug in GL 2 paint engine (visible in arthur demos).Samuel Rødal2009-08-261-1/+1
| | | | | | | | | | QVectorPath::hints() is not a strict bit field, and thus can not be anded with RectangleHint. Instead, QVectorPath::shape() should be directly compared with RectangleHint to check if the vector path is a rectangle or not. In this case the first four points of a regular painter path were treated as a rectangle with dire consequences. Reviewed-by: Tom
* Removed warnings / debug output in the GL 2 engine / pixmap filter code.Samuel Rødal2009-08-252-2/+1
| | | | Reviewed-by: Tom
* Fix obsolete license headers.Jason McDonald2009-08-212-5/+5
| | | | Reviewed-by: Trust Me
* compile fix with namespaces in QGLCustomShaderStagePrivatehjk2009-08-211-0/+4
|
* Fix drawTiledPixmap for texture_from_pixmap on X11/EGLTom Cooksey2009-08-211-0/+1
| | | | | | | QGLContextPrivate::bindTextureFromNativePixmap() needs to abort if it's not allowed to return a y-inverted texture. Reviewed-by: Trustme
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into master-s60axis2009-08-217-68/+413
|\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| * Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-211-0/+1
| |\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/graphicsview.pri
| * \ Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-192-12/+31
| |\ \ | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h
| * \ \ Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-179-14/+24
| |\ \ \
| * \ \ \ Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-072-17/+80
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/graphicsview.pri src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem.h src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp tests/auto/auto.pro
| * | | | | Fixed various valgrind-reported issues in GL 2 engine.Samuel Rødal2009-07-292-3/+2
| | | | | |
| * | | | | Improve GL filter performance by caching custom shader programs.Samuel Rødal2009-07-282-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | This brings performance back up to where it was pre-merge.
| * | | | | Merge commit 'qt-graphics-team/pixmapfilters-redux' into kinetic-graphicseffectSamuel Rødal2009-07-287-34/+72
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qglengineshadermanager.cpp src/opengl/gl2paintengineex/qglengineshadermanager_p.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h Merge custom shader / GL blur pixmap filter implementation from graphics team repo with implementation from kinetic graphics-team repo.
| | * | | | | Further optimized the GL blur filter by caching the QGLShader.Samuel Rødal2009-07-021-1/+0
| | | | | | |
| | * | | | | Added caching of custom shader programs as well in GL 2 shader manager.Samuel Rødal2009-07-012-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensures that the programs are evicted from the cache when the shaders are destroyed.
| | * | | | | Added missing createPixmapFilter() implementation in GL 2 engine.Samuel Rødal2009-06-302-0/+10
| | | | | | |
| | * | | | | Added drawTexture function to GL 2 paint engine.Samuel Rødal2009-06-302-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Works just like drawImage / drawPixmap but uses the given texture id.
| | * | | | | Added custom shader hook to the GL 2 paint engine.Samuel Rødal2009-06-305-24/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to implement pixmap filters, YUV->RGB conversions, etc in other parts of Qt.
| * | | | | | Reset shader stage variables when the custom shader is explicitly removed.Rhys Weatherley2009-07-241-0/+2
| | | | | | |
| * | | | | | Make it easier to change custom shaders.Rhys Weatherley2009-07-244-0/+26
| | | | | | |
| * | | | | | Make ordinary shaders work again after custom shader changes.Rhys Weatherley2009-07-241-7/+7
| | | | | | |
| * | | | | | Actually add the files... :-)Tom Cooksey2009-07-232-0/+196
| | | | | | |
| * | | | | | Initial stab at a custom shader stage APITom Cooksey2009-07-234-54/+129
| | | | | | |
* | | | | | | Merge commit 'qt/master'Jason Barron2009-08-201-0/+1
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/painting/svgviewer/files/bubbles.svg src/corelib/kernel/qobject.cpp src/network/kernel/qhostinfo.cpp tests/auto/qhostinfo/tst_qhostinfo.cpp
| * | | | | | Fixed an assert in debug mode when drawing text with theTrond Kjernåsen2009-08-201-0/+1
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL 2 engine on embedded. Worked in release because we don't really use any internals in QDataBuffer that sets the internal size correctly. Reviewed-by: Samuel
* | | | | | Merge commit 'qt/master'Jason Barron2009-08-182-12/+31
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples.qdoc doc/src/plugins-howto.qdoc doc/src/topics.qdoc examples/phonon/musicplayer/mainwindow.cpp src/3rdparty/freetype/src/base/ftobjs.c src/corelib/global/qglobal.h src/corelib/tools/qalgorithms.h src/corelib/tools/qshareddata.cpp src/corelib/tools/qsharedpointer.cpp src/corelib/tools/tools.pri src/corelib/xml/qxmlstream.h src/gui/painting/painting.pri src/gui/widgets/qdatetimeedit.cpp tests/auto/qdesktopservices/qdesktopservices.pro tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qtextcodec/test/test.pro
| * | | | | Fixed text rendering on GL ES 2 implementations.Trond Kjernåsen2009-08-172-12/+31
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some GL ES 2 implementations seem to have problems with glCopyTexSubImage2D(), so we fall back and read the old font texture into system memory and re-upload the new font texture. Also, the precision used for texture coordinates in the fragment programs wasn't high enough, which could lead to rendering artifacts. Reviewed-by: Samuel
* | | | | Merge commit 'qt/master'Jason Barron2009-08-139-14/+24
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | | | Update contact URL in license headers.Jason McDonald2009-08-129-9/+9
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | | Fixed uploading of glyphs to the glyph cache in the GL2 engine.Kim Motoyoshi Kalland2009-08-111-5/+15
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Upload the glyph one scanline at a time to work around what probably is a driver bug. This replaces a previous fix 6d0290b2202d4fc084595ba678c2a2d984392e72. Reviewed-by: Tom
* | | | Rename Q_DECLARE_SCOPED_PRIVATE back to Q_DECLARE_PRIVATEHarald Fernengel2009-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Rationale: We're using template magic now to get the private pointer in qglobal.h, so no need to have two macros. Also keeps backward compatibility with outside (KDE) code.
* | | | Merge commit 'origin/master'Jason Barron2009-08-041-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/kernel/qmetatype.cpp src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/gui/graphicsview/qgraphicssceneevent.h src/gui/itemviews/qheaderview.h src/gui/kernel/qapplication_qws.cpp src/gui/kernel/qgesture.h src/gui/kernel/qgesturerecognizer.h src/gui/painting/qpaintengine_raster.cpp src/network/access/qhttpnetworkreply.cpp src/network/access/qnetworkcookie.h src/network/socket/qnativesocketengine_unix.cpp
| * | | | Squashed commit of the topic/exceptions branch.Harald Fernengel2009-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Contains some smaller fixes and renaming of macros. Looks big, but isn't scary at all ;)
* | | | | Merge commit 'qt/master-stable'Jason Barron2009-08-042-17/+80
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/openssl/openssl.pri demos/embedded/embedded.pro examples/itemviews/chart/chart.pro examples/network/network.pro examples/painting/painterpaths/painterpaths.pro examples/threads/mandelbrot/mandelbrot.pro qmake/project.cpp src/3rdparty/libtiff/libtiff/tif_config.h src/corelib/arch/arch.pri src/corelib/global/qglobal.cpp src/corelib/kernel/kernel.pri src/corelib/kernel/qcore_unix_p.h src/corelib/kernel/qobject.cpp src/corelib/thread/qthread_unix.cpp src/corelib/tools/qsharedpointer_impl.h src/corelib/tools/tools.pri src/gui/kernel/qaction.h src/gui/kernel/qapplication.cpp src/gui/painting/qregion.h src/gui/widgets/qlineedit.cpp src/gui/widgets/qlineedit_p.h src/network/socket/qnativesocketengine_unix.cpp tests/auto/qdir/tst_qdir.cpp tests/auto/qdiriterator/tst_qdiriterator.cpp tests/auto/qhttp/qhttp.pro tests/auto/qline/qline.pro tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qresourceengine/qresourceengine.pro tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qstring/qstring.pro tests/auto/qtcpsocket/qtcpsocket.pro tests/auto/qtcpsocket/tst_qtcpsocket.cpp
| * | | | Optimized single-rect clip case in OpenGL 2 paint engine.Samuel Rødal2009-07-292-17/+80
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use scissor based clipping when only dealing with rectangular intersect clips. As soon as we get any more complex clips (or unite/replace clips) we fall back to depth buffer based clipping. Task-number: 258748 Reviewed-by: Tom
* | | | Merge commit 'qt/master-stable'Jason Barron2009-07-276-138/+197
|\ \ \ \ | |/ / / | | / / | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe qmake/Makefile.unix qmake/generators/makefile.cpp src/corelib/global/qglobal.h src/corelib/kernel/kernel.pri src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qaction.cpp src/gui/kernel/qaction.h src/gui/kernel/qaction_p.h src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget.h src/gui/kernel/qwidget_mac.mm src/gui/painting/qgraphicssystemfactory.cpp src/gui/styles/qwindowsstyle.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qabstractscrollarea_p.h src/network/access/qnetworkaccessdebugpipebackend.cpp src/network/socket/qlocalsocket_unix.cpp src/network/socket/qnativesocketengine_p.h src/network/socket/qnativesocketengine_unix.cpp src/openvg/qpaintengine_vg.cpp tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp tests/auto/qcssparser/qcssparser.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfile/tst_qfile.cpp tests/auto/qobject/tst_qobject.cpp tests/auto/qpathclipper/qpathclipper.pro tests/auto/qprocess/tst_qprocess.cpp tests/auto/qsettings/tst_qsettings.cpp tests/auto/qsharedpointer/qsharedpointer.pro tests/auto/qsqlquerymodel/qsqlquerymodel.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qwidget/tst_qwidget.cpp
| * | Use texture_from_pixmap on X11 & avoid copiesTom Cooksey2009-07-221-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch tries to use texture_from_pixmap extentions on glX to properly bind an X Pixmap to a texture in QGLContextPrivate::bindTexture(QPixmap,). Because GL & X have different coordinate systems, the pixmap will be inverted about the y-axis. The extension does however allow a GLX_Y_INVERTED_EXT attribute to be set which will bind the pixmap the correct way up. If the underlying driver doesn't support this, texture_from_pixmap can't be used for QGLContext::bindTexture, because that function expects the resulting texture to be the right way up. However, it can still be used internally by the paint engine for drawPixmap operations. For these cases, if the pixmap is inverted, the paint engine can simply invert the texture coords to compensate. This is why this patch also moves QGLTexture into qgl_p.h. QGLContextPrivate::bindTexture(QPixmap,) now returns a QGLTexture which the paint engine can inspect to see if it needs to invert the texture coords. Finally, it seems on some (probably all) drivers, deleting an X pixmap which has been bound to a texture before calling glFinish/swapBuffers renders garbage. Presumably this is because X deletes the pixmap behind the driver's back before it's had a chance to use it. To fix this, we reference all QPixmaps which have been bound to stop them being deleted and only deref them after we swap the buffer, when they can be safely deleted. Reviewed-By: Kim
| * | Fixed opacity bug in the GL2 paint engine.Kim Motoyoshi Kalland2009-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | When premultiplying a color with the opacity, the color's alpha channel was not set correcly. Reviewed-by: Tom
| * | Fixed gradient bug in the GL2 paint engine.Kim Motoyoshi Kalland2009-07-211-3/+3
| | | | | | | | | | | | | | | | | | | | | Texture filtering was set before binding the texture, so the gradient spread was not set correctly. Reviewed-by: Tom
| * | Fixed crash in the GL2 engine's texture glyph cache.Kim Motoyoshi Kalland2009-07-211-4/+12
| | | | | | | | | | | | Reviewed-by: Tom
| * | Used QGLContextResource for the gradient cache in the GL2 paint engine.Kim Motoyoshi Kalland2009-07-213-30/+31
| | | | | | | | | | | | Reviewed-by: Tom