summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* fix uninitialized has_brush,has_pen in QOpenGLPaintEnginePrivateDon Hatch2012-12-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix probably-benign uninitialized memory reads of QOpenGLPaintEnginePrivate's member has_brush (if first call to updatePen() is before first call to updateBrush()) or has_pen (if the opposite). This makes the following error reported by valgrind 3.7.0 disappear: % valgrind --track-origins=yes --leak-check=no demos/composition/composition (press the "Use OpenGL" button) ... ==30137== Conditional jump or move depends on uninitialised value(s) ==30137== at 0x4C72CBD: QOpenGLPaintEnginePrivate::updateUseEmulation() (qpaintengine_opengl.cpp:2135) ==30137== by 0x4C76F2A: QOpenGLPaintEngine::updatePen(QPen const&) (qpaintengine_opengl.cpp:2145) ==30137== by 0x4C7708D: QOpenGLPaintEngine::penChanged() (qpaintengine_opengl.cpp:5416) ==30137== by 0x4C7C960: QOpenGLPaintEngine::begin(QPaintDevice*) (qpaintengine_opengl.cpp:1421) ==30137== by 0x5376BE7: QPainter::begin(QPaintDevice*) (qpainter.cpp:1881) ==30137== by 0x41B06F: ArthurFrame::paintEvent(QPaintEvent*) (arthurwidgets.cpp:149) ==30137== by 0x5223315: QWidget::event(QEvent*) (qwidget.cpp:8532) ==30137== Uninitialised value was created by a heap allocation ==30137== at 0x4A082CF: operator new(unsigned long) (vg_replace_malloc.c:287) ==30137== by 0x4C7736C: QOpenGLPaintEngine::QOpenGLPaintEngine() (qpaintengine_opengl.cpp:1234) ==30137== by 0x4C5171C: QGLEngineThreadStorage<QOpenGLPaintEngine>::engine() (qgl_p.h:939) ==30137== by 0x4C48E32: qt_qgl_paint_engine() (qgl.cpp:5333) ==30137== by 0x4C48E4E: QGLWidget::paintEngine() const (qgl.cpp:5345) ==30137== by 0x5376351: QPainter::begin(QPaintDevice*) (qpainter.cpp:1785) ==30137== by 0x41B06F: ArthurFrame::paintEvent(QPaintEvent*) (arthurwidgets.cpp:149) ==30137== by 0x5223315: QWidget::event(QEvent*) (qwidget.cpp:8532) ==30137== ... These members don't appear at all in the qt5 source, so I'm assuming this isn't an issue there. Therefore I'm submitting this fix directly, and only, to the qt 4.8 source, rather than putting it in qt5 first. (I wasn't able to get the composition demo program to exercise the opengl drawing code at all on qt5, so I can't say for sure whether qt5 is free of similar issues at this point.) Change-Id: Ic69beddd6e2c50b827140cb8790b40b9336c8f4e Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
* Fixed crash in tst_qglthreads.Samuel Rødal2012-11-281-1/+2
| | | | | | | | | | | | | | | QGLTextureCache has a read write locker to protect texture lookups. However, even calling QCache::object() might modify the cache, causing race conditions, since it modifies the priority order of the objects in the cache. Therefore, we need to protect it with a QWriteLocker instead of a QReadLocker. Task-number: QTBUG-22560 Change-Id: I46fffc624ace27e25fb100f865e1df0a19b9093d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> (cherry picked from commit 6633dbbac49f4ce8a89b67090fdffaa8c8126eb5) Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fixed memory leak in assign operator of QGLBufferVadim Zakondyrin2012-11-171-1/+3
| | | | | Change-Id: I90b7e3f352fb7ceea7befabbab7d3b67213dd45f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QGLTextureGlyphCache: Fix text rendering artifacts on NVIDIAJonathan Liu2012-10-301-2/+2
| | | | | | | | | | | Check GL_VENDOR to test whether using NVIDIA graphics. On Linux, GL_VERSION and GL_VENDOR contains "NVIDIA". On Windows, only GL_VENDOR contains "NVIDIA". Task-number: QTBUG-27658 Change-Id: I5e74d07ecb9522d1a86ac2953415a51bbdbe8c49 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> (cherry picked from qtbase/8900bc778f326e6b22ecfceb0b0b64394f3510fb)
* Fixed potential crash in wglCreatePbufferARB() on Windows.Samuel Rødal2012-10-121-2/+3
| | | | | | | | The spec doesn't allow for the piAttribList parameter to be 0. Task-number: QTBUG-27331 Change-Id: I75da84789cf8044e9283bbab29b6435b0d352f22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fixed text drawing in OpenGL 2 paint engine.Samuel Rødal2012-10-031-2/+1
| | | | | | | | | | Regression introduced in 0aa9b30432cec3b7. Partial backport of 12590582a2f676912690 in Qt 5. Task-number: QTBUG-24453 Change-Id: I9522cff661849981096d4efe70164841739ff359 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-292-7/+1
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2982-1992/+1992
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed potential use of uninitialized variable in qgl.cppSamuel Rødal2012-09-211-1/+1
| | | | | | | | | If glGetBooleanv fails this variable is left uninitialized. Task-number: QTBUG-26952 Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438 (cherry picked from commit 0d55b4596f490f8f64eb3134e77e59df7d1c16f9) Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGLGlyphCache: Fix texture buffer overrunJonathan Liu2012-08-271-9/+7
| | | | | | | | | | | | | | The QGLGlyphCache::cacheGlyphs function reallocates a larger texture when there is no more room to insert a newly rendered glyph. However, the glyph width used to check whether reallocation is needed is not the same as the actual glyph image width and may be less. When the glyph image is then copied into the texture, a buffer overrun may occur. Task-number: QTBUG-23584 Change-Id: I71d6cd987b7519e5235109c14a5a35e452332417 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-0182-166/+166
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use improved QLibrary search heuristics in qgl_x11.cppSean Harmer2012-07-271-0/+3
| | | | | Change-Id: Ie806a4147d2d29eef235dd7cb0ef95b8ecf68e3d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Performance fix for OpenGL drawingPauli Jarvinen2012-06-192-7/+0
| | | | | | | | | | | | | | | | | | Excessive calling of glFlush() was causing a performance problem when QML application was being run in the OpenGL graphics mode. There was an unnecessary call to glFlush() in the function QGLWindowSurfaceGLPaintDevice::endPaint(). This function gets called each time a QPainter instance is destroyed, which may happen several times per each painted screen frame (at least 4 times per frame can easily happen). Calling glFlush() from endPaint() is not necessary at all since it will be anyway called from QGLWindowSurface::flush() (either directly if single-buffered context is used or indirectly by swapping buffers if double-buffered context is used). Task-number: ou1cimx1#957423 Change-Id: I89509d8935ad31cc47bfed41a1900b6bb76c2af8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* On Symbian, use 16bit OpenGL if not enough GPU memory for 32bitMurray Read2012-05-071-55/+64
| | | | | | | | | | | | | Using 32-bit config on Symbian only when the low-memory GPU is not used. Otherwise apps that did run with this GPU and Qt 4.7, will not run with Qt 4.8. This is a follow up to 54613aec3bdac668d198923814873a9e622ad675 Task-number: ou1cimx1#997217 Change-Id: I945f10c68b40baa10e60b412b03c650d129b1dae Reviewed-by: Juha Kukkonen <ext-juha.kukkonen@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Prevent stack corruption when using OpenGL Core Profile on WindowsSean Harmer2012-03-061-1/+1
| | | | | | | | | | | This is the backport of commit 1c5b2de9b75a5e74fd7d511fea71edc382d539b6 to qtbase. Change-Id: I8680c20c8b804fb4e77062f52b8f4188b49263a8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Prevent crashing on Symbian in case EGL surface creation fails.Pauli Jarvinen2012-02-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible in environment with limited resources, that EGL surface creation fails. When this happens, the QPainter doesn't get properly activated, which in turn caused a crash later in the drawing code. Now, a check has been added into qapplication_s60.cpp to abort window drawing immediately, if surface creation has failed. The EGL surface is then tried to be recreated on the next time when the window becomes visible, which usually allows the application to recover. In most cases, the crash happened in the function qDrawBorderPixmap, which didn't check the validity of the QPaintEngine pointer before accessing it. This method is analogous with the public methods of the class QPainter where, on the other hand, availability of QPaintEngine was always checked. To be in line, and to prevent ptential crashes, a similar safety check and warning message have now been added to method qDrawBorderPixmap. Furthermore, a null-check was added to qwindowsurface_gl.cpp for the QGLContext pointer. The same pointer was already previously null-checked in the other branch of the same function, indicating that the null-check is probably necessary. Task-number: ou1cimx1#969923 Change-Id: I6d78be72b9c2308ef74b1119d8c8ec34ec015195 Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Fixed crash in GL 2 paint engine on Intel Atom.Samuel Rødal2012-01-164-12/+16
| | | | | | | | | | The GPU in question supports GL 2 but not framebuffer objects. Since we anyway have a font rendering path that doesn't use FBOs we might as well not require framebuffer objects in order to use the GL 2 engine. Task-number: QTBUG-22483 Change-Id: I2a80343fedda276e73e603ffe54edff58801af5b Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Using samples=0 to turn multisampling offmread2012-01-132-2/+2
| | | | | | | | | | | Change 54613aec was using the value 1 for QGLFormat::samples when it wanted multisampling off. But this was actually resulting in multisampling being turned on. It should have been using 0, which it now does. Task-number: ou1cimx1#951223 Change-Id: Ie68367f083f7ab4bae4143a59996c71add3e5c06 Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-1182-83/+83
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix to incorrect ApplicationActivate event in QtOpenGLJani Hautakangas2011-12-163-6/+28
| | | | | | | | | | | | | | | | | | | QEvent::ApplicationActivate is sent incorrectly when application goes to background if OpenGL graphics system is used. The problem is that hidden global shared QGLWidget used by QtOpenGL for root context is added to CONE stack. Qt destroys shared GL widget when application goes to background and underlying CCoeControl is removed from CONE stack which causes CONE to handle stack changes. CONE tries to focus next control in stack which causes incorrect focus events in Qt leading to ApplicationActivate event. GL global share widget must not be added to CONE stack because it's hidden utility widget and don't belong to UI widget stack. Task-number: QTBUG-23195 Task-number: ou1cimx1#946477 Reviewed-by: Murray Read
* Revert "Fix memory leaks in OpenVG and OpenGL resource pools"mread2011-12-121-2/+4
| | | | | | | | | | | | This reverts commit 8752faf0564bed86396b01529dc8ef5064150f4c. Also Revert "Fix def files" This reverts commit d2a3b9ee8c9329cac96b5e509df0e6a69dbef91c. This was found to cause a crash in QMLGallery app. It is not necessary to delete these resource pools at app exit, as the OS should automatically release the resources at this point. Reviewed-by: Jani Hautakangas
* Fix window surface config on OpenGL graphics system.Jani Hautakangas2011-12-092-8/+33
| | | | | | | | | QtOpenGL uses 16-bit configs by default but on Symbian it should use 32-bit config. Task-number: QTBUG-23082 Task-number: ou1cimx1#951223 Reviewed-by: Murray Read
* Symbian: allow apps to disable GL multisamplingmread2011-12-051-1/+4
| | | | | | | | | | | | | | | | On Symbian, QML apps had no way to disable GL multisampling if the hardware supported it. This caused some apps to run out of graphics memory and fail. This change adds a way for apps to indicate that they don't want multisampling, by setting an environment variable. For example: qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); This non-public API style was used as the use case is platform and application specific, and not appropriate for public API. Task-number: ou1cimx1#947771 Reviewed-by: Gareth Stockwell
* Fix memory leaks in OpenVG and OpenGL resource poolsJani Hautakangas2011-11-301-4/+2
| | | | | Task-number: QTBUG-22743 Reviewed-by: Murray Read
* Merge remote-tracking branch 'qt-qa-review/master'Sergio Ahumada2011-11-262-2/+2
|\
| * Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-teamQt Continuous Integration System2011-08-222-2/+2
| |\ | | | | | | | | | | | | * 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team: Doc: Fixing typo
| | * Doc: Fixing typoSergio Ahumada2011-08-172-2/+2
| | | | | | | | | | | | | | | | | | | | | Reducing the amount of spelling errors from NBN. Change-Id: I9b228bb95b4a757cff57595125009e70b0097d86 Reviewed-by: Rohan McGovern
* | | Fix to QtOpenGL crash on SymbianJani Hautakangas2011-11-082-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under some rare circumstances EGL context creation fails on Symbian leading to application crash. However, Qt is able to recover from this if context pointers are guarded by null pointer checks in QtOpenGL. Task-number: QT-5334 Reviewed-by: Samuel Rødal
* | | Clear error due to FRAMEBUFFER_SRGB_CAPABLE_EXTJani Hautakangas2011-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | glGetBooleanv generates an error if this param isn't supported. This error generates wrong warnings in later states. Reviewed-by: Eskil
* | | Add GL_EXT_texture_format_BGRA8888 support.Jani Hautakangas2011-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | QtOpenGL supports GL_IMG_texture_format_BGRA8888 but GL_EXT_texture_format_BGRA8888 is missing. These extensions are essentially the same. Task-number: QTBUG-22538 Reviewed-by: Samuel Rødal
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-10-273-1/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix possible crash in glyph cache when deleting and creating contexts
| * | | Fix possible crash in glyph cache when deleting and creating contextsEskil Abrahamsen Blomfeldt2011-10-253-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The freeResource(), used in the glyph cache as a notifier of when the owner context of the cache disappears, is never called if the context is in a group with other contexts that share its resources. This implements a second notifier function instead which can be used to invalidate the glyph cache when its context is destroyed. Task-number: QTBUG-22324 Reviewed-by: Samuel
* | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-255-10/+32
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qeventdispatcher_symbian.cpp src/declarative/qml/qdeclarativetypeloader.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/opengl/qgl.cpp src/opengl/qgl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/declarative/qdeclarativescriptdebugging/qdeclarativescriptdebugging.pro tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro tests/auto/qaudioinput/qaudioinput.pro tests/auto/qaudiooutput/qaudiooutput.pro tests/auto/qchar/qchar.pro tests/auto/qclipboard/test/test.pro tests/auto/qsound/qsound.pro
| * | | Workaround to VideoCore III scissor bug.Jani Hautakangas2011-10-194-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of VideoCore III drivers seem to pollute and use stencil buffer when using glScissors. Workaround is to clear stencil buffer before disabling scissoring. Task-number: QT-5308 Reviewed-by: Samuel Rødal
| * | | Fix to QGLWidget crashJani Hautakangas2011-10-183-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGLWidget crashed due to regression caused by fix to QTTH-1553. Crash only occurred if application was locked to landscape mode but started when device was in portrait mode. Task-number: QTTH-1597 Reviewed-by: Laszlo Agocs
* | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-071-1/+19
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/getting-started/installation.qdoc doc/src/platforms/platform-notes.qdoc src/corelib/tools/qlocale_symbian.cpp src/gui/kernel/qwidget_p.h src/network/access/qnetworkaccesshttpbackend.cpp src/opengl/qgl.cpp src/plugins/bearer/symbian/qnetworksession_impl.cpp
| * | | Do not let QGLContext get out of sync when doing mixed VG-GL renderingLaszlo Agocs2011-10-061-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default graphics system is openvg, this means that apps using QGLWidget (despite the official recommendation), without explicitly setting opengl as the graphics system will use both the openvg and opengl modules to perform rendering. This presents some problems because QtOpenGL's comes with its own wrapper over QEglContext, and making a foreign QEglContext (e.g. from VG) current will cause its state to get out of sync, resulting in various drawing issues due to skipped makeCurrent and similar calls. The patch works this around by querying the current context from EGL in QGLContext::currentContext() and returning null if the EGLContext does not match. This somewhat ugly workaround ensures that at least QGLContext::currentContext() will not lie: It will not return a valid pointer when the underlying QEglContext's underlying EGLContext is not actually the current context. This will allow e.g. QGLPaintDevice::beginPaint to correctly recognize the need for making the GL widget's context current and thus avoid various rendering issues in certain games. Task-number: QTTH-1553 Reviewed-by: Jani Hautakangas
* | | | wtf? .pro.user files? congrats to overriding the hook!Oswald Buddenhagen2011-09-131-83/+0
| | | |
* | | | Fix QGLGlyphCache for Open GL ES (1).Eike Ziller2011-08-241-15/+20
| |/ / |/| | | | | | | | | | | | | | | | | When resizing the font texture the code was using glGetTexImage which is not available on Open GL ES. We need to cache the font texture data, and draw the glyphs on it in addition, so we can copy the data when resizing the texture size.
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-031-18/+30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fixed compile error in qwindowsurface_qws.cpp. Fixed regression introduced by 5842d19cf3dff37a85c. Fix gamma corrected source color in GL
| * | | Fix gamma corrected source color in GLJiang Jiang2011-07-291-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL_EXT_framebuffer_sRGB expects linear RGB as input color, thus we need to convert sRGB based input color into linear RGB first before using glBlendColor with it. Task-number: QTBUG-20574 Reviewed-by: Samuel Rødal
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-015-28/+151
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Make macdeployqt more robust against usage of symbolic links. Document support for Linguist on Mac. Make mac(deploy|change)qt handle dylibs that use Qt inside an app bundle. Guard macdeployqt against @rpath and @loader_path too. Fix typo. OpenVG cleanup. Include trailing space width in RTL text line width Fix the compilation error when QT_NO_PLUGIN_CHECK was set. Fixed holes in border image drawing by introducing new API. Properly resolve and use glMapBuffer / glUnmapBuffer on GLES2. Revert "fix QFileInfo::isSymLink() for NTFS mount points" Remove debug output. Add some sound support to the uikit platform. Add flickrdemo uikit example project. Fix uikit simulator build. Get subpixel antialiasing again w/combo of raster and affine transform Add initial support for bitmap version 4/5 headers. optimize QRawFont::supportsCharacter() Switch to use floating point pixelSize in QRawFont completely Add a way to check if we have a matching family in the database.
| * | Fixed holes in border image drawing by introducing new API.Samuel Rødal2011-07-262-15/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rasterizing two adjacent QRectFs it's important that the shared x or y-edges have the exact same coordinates, or there might be a hole or an overlapping pixel when they are rasterized. Since the drawPixmapFragments API was based on a center position and a scale, it can not be used for this purpose, as the in the situation of two horizontally adjacent rectangles the right edge of the left-most rect and the left edge of the right-most edge are computed differently. Thus rounding errors can cause them to not be equal, especially when there's also a scaling / translating painter transform involved. Thus, to not sacrifice performance, we need to introduce a new drawPixmapFragments API that's simply takes an array of target rectangles and an array of source rectangles. It should give a slight performance boost for the border pixmap use case as well, since there are less floating point multiplications / divisions involved. Task-number: QTBUG-19079 Reviewed-by: Kim
| * | Properly resolve and use glMapBuffer / glUnmapBuffer on GLES2.Samuel Rødal2011-07-263-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Even though we're able to resolve the function pointers, the spec says we have to check for the GL_OES_mapbuffer extension before we use them. Fixes a crash on a platform that doesn't advertise the extension but still resolves the function pointers. Reviewed-by: Kim
* | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-221-0/+4
|\ \ \ | |/ / |/| / | |/ | | Conflicts: src/gui/image/qtiffhandler.cpp
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-07-211-0/+4
| |\ | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix compilation on Symbian platforms without SgImage support
| | * Fix compilation on Symbian platforms without SgImage supportJani Hautakangas2011-07-211-0/+4
| | | | | | | | | | | | Reviewed-by: Laszlo Agocs
* | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-201-12/+8
|\ \ \ | |/ / | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
| * | Don't use GL_REPEAT for NPOT textures in GLES2.Samuel Rødal2011-07-181-1/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already handle NPOT textures correctly by calling fract() on the texture coordinates in the fragment shader, but we also need to make sure not to set GL_REPEAT as the wrap mode, because the GLES2 spec says that the driver should return (0, 0, 0, 1) if an NPOT texture has wrap mode different from GL_CLAMP_TO_EDGE. Previous GLES2-implementations we've tested on have thus not been GLES2-compliant (or supported GL_OES_texture_npot). Partial back-port / modification of c5a377e944f9a87c372ff8371c66b03d861803a6 in 4.8. Reviewed-by: Kim
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into ↵Qt Continuous Integration System2011-07-081-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Applied fix (dea9ca8b7a4166e1c3d3fc374621ad02c1220d3a)from qt5/qtbase. Committing the qt-webpages.qdoc file with the online links Preparing documentation package for 4.8-beta Doc: Clarified the range of return values from QLineF::angle(). Doc: Fixed \since declarations. (cherry picked from commit 358e018dbb4b4dbdbfc702a6d462f113a1357e1e) Doc: Standardized on QtQuick for \since declarations. (cherry picked from commit 609dc22f719ecb8d48349fd56f84960bbf46d731) Doc: Removed whitespace. (cherry picked from commit 01b3f508d1f7e9951baf60f487feadfa98ba4751) Modified \since command behavior slightly to handle project and version. Doc: Added a simple introduction to Qt and fixed links. (cherry picked from commit 9ed61311bce15b8f1bb4b30ee9133f1a2355f41d) Doc: Added more appropriate links to help reduce confusion. Doc: Removed non-ASCII characters from the documentation. (cherry picked from commit 1bd6f1bd280ee6e1ecd4de2291c8ccfb4d06b7a4) Doc: Updated documentation with \since 4.8 declarations.