summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Resurrect QGLWidget::renderPixmap()Laszlo Agocs2014-01-063-46/+61
| | | | | | | | | | | | | | | | This function has been completely broken since Qt 5.0. Unfortunately the autotest's verification steps were somewhat faulty so returning a null pixmap from renderPixmap() did not trigger a failure. The implementation is now done with framebuffer objects and pixel readback. This is not ideal performance-wise, but is the only option. In Qt 4 pixmaps were often backed by platform dependent native pixmaps that could be used as rendering targets for OpenGL content. This is not an option anymore since pixmaps are raster backed on all the major platforms. Task-number: QTBUG-33186 Change-Id: I8f558e33bf7967ac3be439fd5a3eac07b6444be5 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fix radial gradient shader compilation for OpenGL ES 2.0.Carsten Munk2013-12-051-2/+2
| | | | | | | | | Change highp to mediump. This qualifier is ignored on desktop, and mediump should be sufficient elsewhere. Task-number: QTBUG-35353 Change-Id: I79f0ed88717d45dada5dcb781e75b10e72db4bd0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fix broken linksSze Howe Koh2013-11-051-1/+1
| | | | | | | | Task-number: QTBUG-33360 Change-Id: Ic944cb2f575c35ebad64852ef5fc44a50ac03571 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Do not byteswap RGBA8888 formatsAllan Sandfeld Jensen2013-10-251-4/+32
| | | | | | | | | | | | | The three RGBA8888 formats was introduced to make it possible to have QImages and QPixmaps in native OpenGL formats, but uploaded textures of these types are still converted to ARGB first and then swapped back. This patch detects the formats and ensures the unneeded back-and-forth conversion does not take place. It also replaces a seemingly unused private API meant for the same goal. Change-Id: Id69d6973bb9c13d1052f2a1b0c516183f63421c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Avoid calling convertFromGLImage on a null image.Gunnar Sletta2013-10-141-0/+5
| | | | | | | Task-number: QTBUG-34017 Change-Id: If51ef4b1f906677e26d14b5a92799097d18ac437 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-088-87/+87
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Remove code that doesn't do anything.Gunnar Sletta2013-09-261-12/+0
| | | | | Change-Id: Id2528167f21e1ab81b998ceb808a9fc4a24b239a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix a memory leak in QGLWidget::renderTextLaszlo Agocs2013-09-201-0/+2
| | | | | | | Task-number: QTBUG-32792 Change-Id: Ie9293a1919c1bdf13a5c357a8d2eac303a83d4d4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix QtOpenGL module build with -WerrorKonstantin Ritt2013-09-091-4/+4
| | | | | | | | | | Build failed with error "array subscript is above array bounds [-Werror=array-bounds]" because GCC optimizes three inline calls and sees A[4][4] != A[16]. According to Thiago this may lead to an undefined behavior after all. Change-Id: I31ec01377d856890f6072369b3acd1f37e4118ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Fix upload of glyphs when using RGB32 masks on OpenGL ESGunnar Sletta2013-07-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | OpenGL ES doesn't allow internal format to be different from external format, so always do the conversion from BGRA -> RGBA. We are anyway iterating over all the pixels so the performance impact of this should be minimal. Change-Id: Ie891665ad66e31692b69db02d34be8d303a7d631 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-111-12/+38
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Restore smooth-scaled drawing of 0.5x-2.0x scaled glyphs in the GL engineTor Arne Vestbø2013-07-081-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b5922c89ba942 (Add support for retina glyph-based text drawing in the GL engine), and commit 155a20628b91 (Use QPaintEngineEx to decide if font is too big for using the glyph cache) together changed the behavior of drawing scaled cached glyphs in the GL engine, producing blocky text drawing when using the FreeType font engine. Whereas before we would cache all glyphs without any transform, and let the paint engine take care of the transform, commit b5922c added support for a scaled GL glyph cache, resulting in a 2x cache, drawn at 1x for example. The problem was that the FreeType engine claimed to support producing glyphs at 2x, but did that using the QFontEngine baseclass implementations, which use a simple fast-transform to scale up the glyphs. The result was a 2x cache with horrible looking glyphs. The first step in fixing this issue was to have the FreeType engine claim to only support translations. This would then make the paint engine choose path-based drawing for all scaled text, which is slow. To restore the optimization that we would draw 0.5x-2.0x scaled text using a smooth-scale in the GL engine (which was removed in 155a206), we then needed to extend shouldDrawCachedGlyphs() and add a special condition for this, coupled with a bit of logic in drawCachedGlyphs() that ensures we don't propagate the painter scale to the glyph cache if the engine is not able to produce scaled glyphs for it. This means we get the old behavior of the GL engine doing a smooth scale of the 1x glyph in the cache. Finally, since the raster engine also checks if the font engine supports the current transform, but for FreeType then ends up in a separate code path when actually drawing the glyphs (as the FreeType font engine supports internal glyph caching), we need to add a corresponding check for hasInternalCaching() in the shouldDrawCachedGlyphs() function, now that the FreeType engine only reports that it supports translations. Change-Id: Id03de896dec5f29535b281fb235332ef018045d8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Set projection matrix for systems with OpenGL 3.1Wouter Huysentruit2013-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | The projection matrix should also be set for systems running OpenGL 3.1 with GL_ARB_compatibility extension. Task-number: QTBUG-28284 Change-Id: I756155a6064dcbff29fd817e676d31f24f559e8c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Doc: Adding navigation configs in the module qdocconf files.Jerome Pasion2013-06-251-1/+4
|/ | | | | | | | -The navigation bar requires the titles of the landing page and relevant pages. Change-Id: I5d5986b2bf74205cd49957b63fd6ac4e32cbb36b Reviewed-by: Martin Smith <martin.smith@digia.com>
* qdoc: QGLFrameBufferObject::bindDefault() was marked \internalMartin Smith2013-06-101-1/+0
| | | | | | | | | The \internal is removed. Task-number: QTBUG-31638 Change-Id: Ib1b65783599fe50e907373e3223a0774f17ac65e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fixed crashes in QGLTextureDestroyer.Samuel Rødal2013-05-292-19/+7
| | | | | | | | | | | QGLTextureDestroyer will try to make the context current on the GUI thread, regardless of whether it is owned by another thread. Use QOpenGLSharedResourceGuard instead which does the right thing and takes shared contexts into account. Task-number: QTBUG-31403 Change-Id: I1377f9284995a7ba5af32c85296eef152fc035c8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Removed pages from "technology-apis" group.Jerome Pasion2013-05-271-3/+0
| | | | | | | | "technology-apis" doesn't serve a purpose anymore and its product function is replaced by the new overviews on the landing page. Change-Id: I1e959981fd163966a54bec0d697bed12007c39e6 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Prevent QOpenGLShaderProgram::link() from showing unnecessary warnings.Samuel Rødal2013-05-241-4/+6
| | | | | | | | | | | | | | | If the liking didn't fail there's no need to print out warnings. The warnings can still be accessed by the application after calling link() through the log() function. This prevents warnings such as these from appearing: QOpenGLShader::link: "No errors." Task-number: QTBUG-31326 Change-Id: I03c9be5dfada8822c3ab1c3610eac2fc0a91410b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fixed static linking against QtGui and QtOpenGLradman0x2013-05-242-20/+20
| | | | | | | | | | | When linking QtGui and QtOpenGL libraries on linux a multiple defined symbols linker error causes failure. This change renames the offending class in the QtOpenGL library. For more information see: http://qt-project.org/forums/viewthread/27458 Change-Id: I05488bf2c5c612476432c11095b24bc2b29c78f2 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QGLWidget: Support retina framebuffer grabbingGabriel de Dietrich2013-05-231-3/+4
| | | | | | | | | And update the opengl/grabber example. Task-number: QTBUG-31173 Change-Id: If09f1f3634b353d034f51240fc68be6ee7aabb48 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fixed crash associated with reparenting a QGLWidgetSamuel Rødal2013-05-222-1/+12
| | | | | | | | | | | | | | | We need to make sure that we don't reset() the context when the QGLWidget is being reparented, as that will lead to the QOpenGLContext being destroyed and not recreated, leading to a crash in makeCurrent(). Also, don't destroy() the widget if it has not yet been created, as in that case there's no ParentAboutToChange event sent. Task-number: QTBUG-31016 Change-Id: I409fff94456802a80bd72b470a6fbaee87505baa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Doc: Fix invalid exampledirs in qtopengl.qdocconfTopi Reinio2013-05-101-2/+0
| | | | | | | | | Remove redundant and invalid exampledirs definition from .qdocconf for Qt Open GL module. Change-Id: I5a725bf57d78b2fd35aa4dbd24e8cb3881499ed3 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Give C++ class lists consistent titlesSze Howe Koh2013-04-292-2/+2
| | | | | | | | | | | | | The majority format is "<Qt Module> C++ Classes" (see http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html) Also, fix a broken link (Qt Network C++ Classes) "<Qt Module> C++ API" is perhaps the more correct format, but that's part of a much bigger cleanup: QTBUG-30556 Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix module name in .qdocconfTopi Reinio2013-04-261-11/+11
| | | | | | | | | Use CamelCase for module name(s) used in in .qdocconf - this is required as qdoc will generate visible output (tags in example manifest files) based on these names. Change-Id: Ie246e740203ee0b996fea5dee612bf7f61638991 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fixed QGLWidget not being able to be made current with a context.Samuel Rødal2013-04-231-4/+9
| | | | | | | | | | | If the QGLWidget's creation is triggered by a sibling or similar being created it would end up without the surface type OpenGLSurface. We need to make sure the QWindow has the correct surface type to prevent QOpenGLContext::makeCurrent() from failing. Task-number: QTBUG-30811 Change-Id: Ifc85f9120d89bd0bed4a3911233799830cb3a0f3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make QGLPaintEngine work on retina displays.Morten Johan Sørvig2013-04-151-0/+6
| | | | | | | | | | | | | | QGLWidgetGLPaintDevice::size now returns the size in device pixels. This fixes the QPainter "overpainting" and GraphicsView with a QGLWidget viewport use cases. Task-number: QTBUG-30217 Change-Id: I01998d39d7b4d755cf8b7b3fab5f75cd0d899ccf Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add devicePixelRatio metric to QPaintDevice.Morten Johan Sørvig2013-04-153-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPainter computed the devicePixelRatio based on the physical and logical dpi, and expected that the ratio between them would be either 1x or 2x. This was problematic for paint devices like printers where the physical dpi can be much higher than the logical dpi, and also for QScreen where the physical dpi would have to be defined as a multiple of the logical dpi. Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice:: devicePixelRatio() getter and implement it for the QPaintDevice subclasses. Use it when calculating the highdpi scale transform in qpainter.cpp and when scaling the clip rect in qwidget.cpp. Remove physical dpi scaling for QImage, QPixmap and QOpenGLPaintDevice, reverting to the old behavior. Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove unused private membersThiago Macieira2013-03-231-1/+0
| | | | | | | | | | | | | These members are in private classe, so we can safely remove them. qpathclipper.cpp:762:9: error: private field 'm_point' is not used [-Werror,-Wunused-private-field] qsimpledrag_p.h:100:20: error: private field 'm_cursor_drop_action' is not used etc. Change-Id: I35ed486eb959c49bb971700500a66411308ee7bc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-2030-1703/+415
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Introducing the Qt Android portPaul Olav Tvete2013-03-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the Necessitas project by Bogdan Vatra. Contributors to the Qt5 project: BogDan Vatra <bogdan@kde.org> Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> hjk <hjk121@nokiamail.com> Oswald Buddenhagen <oswald.buddenhagen@digia.com> Paul Olav Tvete <paul.tvete@digia.com> Robin Burchell <robin+qt@viroteck.net> Samuel Rødal <samuel.rodal@digia.com> Yoann Lopes <yoann.lopes@digia.com> The full history of the Qt5 port can be found in refs/old-heads/android, SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-181-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qmacstyle_mac.mm Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
| * \ Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Giuseppe D'Angelo2013-02-176-35/+10
| |\ \ | | | | | | | | | | | | refs/staging/dev
| | * \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-146-35/+10
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * | | | Remove duplicated code for handling OpenGL extensions in QtOpenGLTor Arne Vestbø2013-02-1715-1606/+365
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now re-use QOpenGLExtensions/Functions from QtGui in the same way as QtGui uses these classes. There is still some duplicated logic in qglfunctions.cpp, but this code now at least uses the shared QOpenGLExtensionMatcher class. Change-Id: Ie04008c43d430ae805e6ec1c45e7e363deeb3b8f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * | | Use QPaintEngineEx to decide if font is too big for using the glyph cacheTor Arne Vestbø2013-02-071-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having separate logic in the OpenGL paint engine. Change-Id: I9854328f784864e52ba1bbaafe5e1c5dda976231 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | | Fix change-of-sign warning found by ICCThiago Macieira2013-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qdbusintegrator_p.h(119): error #68: integer conversion resulted in a change of sign : QMetaCallEvent(0, -1, 0, sender, -1, 0, 0, 0, s), connection(c), node(n), ^ qpaintengineex_opengl2_p.h(193): error #68: integer conversion resulted in a change of sign void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id = -1); ^ Change-Id: I7de381ea9ff348878ee99e5a18525352a779b31e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | | Drop the unused qt_gl_convertToGLFormat functionGiuseppe D'Angelo2013-01-291-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie621f562401b703077a2b304ad6d8445efc76642 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * | | Drop the unused QGLContextPrivate::convertToGLFormat functionGiuseppe D'Angelo2013-01-292-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaa176fc6152162c91a3e3bd373a235883001975c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
| * | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-293-3/+3
| |\ \ \ | | | | | | | | | | | | | | | refs/staging/dev
| | * \ \ Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-283-3/+3
| | |\ \ \ | | | | | | | | | | | | | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * | | | | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-2914-55/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
| * | | | Don't assume m11/m22 represents the scale of a QTransformTor Arne Vestbø2013-01-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can still assume it when pulling out the scale of the glyph cache, since we limit it to scaling, but when computing the scale from the current matrix we have to decompose it. We always use a positive scale in the glyph-cache, and let the drawing code take care of any flipping of the coordinates. Change-Id: Ie3c4f2d91008a9be8f89bef29c15d80b23fb8a82 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
| * | | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2247-47/+47
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * | | | | Add support for retina glyph-based text drawing in the GL paint-engineTor Arne Vestbø2013-01-212-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of always using a non-transformed glyph-cache we now allow a scaled glyph-cache so that retina-screens can take advantage of this. We take the cache's scale into account when positioning and drawing the glyphs so that the scale is not applied twice. Change-Id: Ia927656f0070df61e78da76e97d2c49de4d856d9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | | | | Bump Qt version to 5.1.0Frederik Gladhorn2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6d372c933e48eeda921fe781b073bf4e05b31585 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
| * | | | | Refactor paint/font-engine shouldDrawCachedGlyphs and supportsTransformationsTor Arne Vestbø2013-01-102-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some cruft had built up over time, and this is an attempt at cleaning up the naming and use of these functions, and should not have any behavioral effects. The function supportsTransformations() has been renamed in QPaintEngineEx to reflect its use, which is to decide if QPainter needs to pre-transform the coordinates of the static text before asking the paint-engine to draw it. The new name is requiresPretransformedGlyphPositions(). The OpenGL and CoreGraphics (Mac) paint engines keep their behavior of not needing pre-transformed text, while the raster engine needs this when using cached glyphs. The base-class implementation assumes that all transforms that include a projection will need pre-transform, which is also the case for the raster engine. All decisions in the paint engines about whether or not to use the glyph cache when drawing text are now deferred to the function shouldDrawCachedGlyphs(), which has been refactored for the GL paint engine(s) to share more logic. All implementations call the base class implementation, which ensures that large font sizes will not be cached. The raster engine will in addition ask the font engine whether or not it can produce glyphs for the glyph-cache with the given transform. This is the only remaining instance of the supportsTransformations() function, and will for all font engines except the CoreText engine support affine transformations. The CoreText engine on the other hand only supports translations (for now). Change-Id: I8fb5e43e3de3ef62a526a79a6dfeda7f9546771d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | | | | | Make sure QGLWidget::setContext() is correctly documented as obsolete.Samuel Rødal2013-03-151-1/+7
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-30017 Change-Id: Idf3c943d7aaad294cbf6858cca1c01e841e94b7d Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>