summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_x11.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - 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>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | 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>
* Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'suzuki toshiya2011-08-181-1/+1
| | | | | Merge-request: 1299 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed missing painting with X11 paint engine.Samuel Rødal2011-07-041-0/+2
| | | | | | | Re-introduce some "lost" code from 4.7. Task-number: QTBUG-19639 Reviewed-by: Olivier Goffart
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Fixes warnings about unused variablesOlivier Goffart2011-04-281-3/+0
| | | | Reviewed-by: Samuel
* Fixed remaining issues in subpixel positioning with FreeTypeJiang Jiang2011-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | 1. Merge QStaticText and QGlyphs drawing code of raster engine into glyph drawing code for normal QTextItem, it simplify the caching system (we don't use QImageTextureGlyphCache for raster anymore, just glyph set cache in FreeType engine is enough), and fix some regressions in QStaticText and QGlyphs drawing. 2. Fix subpixel positioning support for OpenGL texture glyph cache. Including a transform handling regression introduced by the initial patch. 3. Disable subpixel positioning for bitmap fonts (mono format). After this change, we only have two code paths for glyph rendering with FreeType: raster will always use the simple code path (with QFontEngine_FT cache) while GL will always use QTextureGlyphCache. Reviewed-by: Eskil
* Implement subpixel positioning with FreeTypeJiang Jiang2011-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngineFT are used in raster/OpenGL paint engine and QGLWidget, also in Symbian, etc. We want to make sure it works well in raster and QGLWidget first. Regardless subpixel antialiasing (LCD filtering) is enabled or not (though it does look better when subpixel antialiasing is on). We also need to support transformations. The tricky part here is that, under X11, we have a different code path for QFontEngineFT and other font engines in raster engine, which uses QFontEngineFT's own glyph cache system. While in other platforms (Windows and Mac) and QGLWidget, we will use the generic QTextureGlyphCache. The generic QTextureGlyphCache already has support for subpixel positions, this solution is ported to QFontEngineFT for its QGlyphSet: the key for QGlyphSet hash table has been extended from glyph_t to <glyph_t, QFixed subPixelPosition> pair. The real work to enable subpixel positioning with FreeType is in fact really simple, we just set the horizontal translation to the subpixel position * 64 (FreeType uses a coordinate system of 1/64 of a pixel resolution internally) immediately before loading the glyph. A slight tweek to bitmap width is applied when we are getting the bitmap ourselves instead of using FT_Render_Glyph to accommodate the subpixel translation, which will only be used in non-LCD filtering cases (grayscale antialiasing). From what we have observed, FreeType can generate different bitmaps for at least 12 different subpixel positions (each with a slight difference). To limit the memory consumption, we restrict the number of subpixel positions to be 4 (hardcoded), which should be good enough for most low resolution displays. Subpixel positioning (and fractional glyph advances) will only be enabled when the hintingPreference for the font being used is PreferNoHinting or PreferVerticalHinting. We will use fontconfig hintstyle setting by default when no hintingPreference is set for the font. Task-number: QTBUG-12279 Reviewed-by: Eskil
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Crash in QX11PaintEngine::drawPixmapCarlos Manuel Duclos Vergara2010-08-181-0/+2
| | | | | | | | | | We receive a pixmap as a const reference and then we convert it to an X11 pixmap. This conversion could fail for many reasons, however we were not looking at the result of this conversion. This patch was contributed by Christoph Feck from KDE. Task-number: QTBUG-12826 Reviewed-by: Samuel
* Revert "Fix the rendering of lines with the X11 paint engine"Samuel Rødal2010-08-181-10/+12
| | | | | | | | | | | | | | | | This reverts commit ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6, which broke fill / outline consistency, and when trying to fix that by rounding the fill the same way that broke rendering in Creator. Unfortunately the X11 paint engine is too sensitive to changes, there have already been tons of patches to make it as consistent as possible. It's simply not possible to get the same rounding for both fill and outlines and at the same time have consistency between fill and outline (no holes or fill outside the outline), while using the integer based Xlib rendering API. Hopefully in 4.8 we'll switch to raster and the X11 paint engine will be a legacy. Reviewed-by: Trond
* Revert "Outline / fill inconsistency in X11 paint engine."Samuel Rødal2010-08-181-4/+4
| | | | | | This reverts commit ff405f5623d7ed18c881c097368e3e9afd2e9443. Reviewed-by: Trond
* Outline / fill inconsistency in X11 paint engine.Samuel Rødal2010-08-171-4/+4
| | | | | | | | | | Change ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6 broke outline / fill consistency in the X11 engine. Since the positioning of lines is more important we'll round the fill coordinates the same way. The bug was visible in the filltest.qps arthur test. Reviewed-by: Gunnar Sletta
* Fix the rendering of lines with the X11 paint engineBenjamin Poulain2010-07-291-12/+10
| | | | | | | | | | | | | On the X11 paint engine, when rendering lines with float coordinates, the lines were one pixel off if the decimal was > 0.5. This fixes the WebKit bug https://bugs.webkit.org/show_bug.cgi?id=42248 Autotest by Yoann Lopes. Reviewed-by: Simon Hausmann Reviewed-by: Yoann Lopes Reviewed-by: Andreas Kling
* Fixed missing stroke for flat ellipses.Samuel Rødal2010-06-151-0/+5
| | | | | | | The behavior should be the same as for arcs and rects. Task-number: QTBUG-2743 Reviewed-by: Eskil
* More Pixmap cache key optimizationsJens Bache-Wiig2010-06-021-1/+6
| | | | Reviewed-by: ogoffart
* Use qrand() instead of rand()Bradley T. Hughes2010-05-041-1/+1
| | | | | | | | This only affects X11 code, and are the only 2 places in Qt where rand() is used instead of qrand(). Task-number: QTBUG-9793 Reviewed-by: TrustMe
* Fixed drawing pixmaps onto bitmaps on X11 w/o Xrender support.Trond Kjernåsen2010-02-101-0/+3
| | | | | Task-number: QTBUG-8032 Reviewed-by: Kim
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fix QtOpenGL linker issue by exporting qt_getClipRectsThorbjørn Lindeijer2009-10-271-1/+1
| | | | | | | It is used in qwindowsurface_x11gl.cpp. The problem only showed when building in release mode due to previous use of Q_AUTOTEST_EXPORT. Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* Fixed bug in X11 paint engine causing source pixmap depth to change.Samuel Rødal2009-10-051-0/+1
| | | | | | | | Setting a pixmap brush when painting to a 32-bit target might cause the source pixmap to be converted to 32-bit. We should detach the pixmap if we need to convert it. Reviewed-by: Trond
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | | | | | Reviewed-by: Trust Me
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | compile again with QExplicitlySharedDataPointerHarald Fernengel2009-08-211-10/+10
| |
* | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtaxis2009-08-191-4/+12
|\ \ | | | | | | | | | | | | Conflicts: tests/auto/auto.pro
| * | Fixed bug when rendering long lines of text without XRender.Samuel Rødal2009-08-181-4/+12
| | | | | | | | | | | | | | | | | | | | | XRectangle coordinates need to be clipped to the short integer range. Task-number: 250137 Reviewed-by: Trond
* | | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-1/+1
| |/ | | | | | | Reviewed-by: Trust Me
* | 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 ;)
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Fixed a byte ordering issue when using the raster graphicssystem.Trond Kjernåsen2009-06-021-7/+10
| | | | | | | | The R and B channels were swapped on little endian machines with BGR layout. Task-number: 254934 Reviewed-by: Samuel
* Prevented X server crash when calling XFillPolygon with >200000 points.Samuel Rødal2009-05-061-1/+25
| | | | | | | | | Don't know why the X server crashes, but it's reproducible both by us and customers so we should fall back to the raster paint engine to avoid the crash. Task-number: 244362 Reviewed-by: Trond
* Fixed rendering of bitmap fonts on X11 with Xrender and fontconfig.Trond Kjernåsen2009-04-281-1/+3
| | | | | | | | It seems the Xrender PictStandardA1 mask format doesn't work with XLFD bitmap fonts wrapped in a fontconfig structure. Task-number: 252328 Reviewed-by: Samuel
* Remove scale applied to cosmetic pens when antialiasing is enabled (X11).Samuel Rødal2009-04-141-1/+4
| | | | | | | | The pen width should not be scaled for cosmetic pens. Task-number: 247083 Reviewed-by: Trond BT: yes
* Fix very slow stroking of paths in X11 paint engine.Samuel Rødal2009-03-271-0/+4
| | | | | | | | Use QStroker::setRect() to avoid dashing parts of the path that are outside the device rect. Task-number: 246573 Reviewed-by: Trond
* Fix mismatch between stroke and fill of ellipses on X11.Samuel Rødal2009-03-271-7/+3
| | | | | | | | | | When drawing ellipse without stroke we need to use the same width/height for the fill as we would use for the stroke for the stroke and fill to match. Filling first and then stroking should produce the same result as filling and stroking in one go. Task-number: 249490 Reviewed-by: Trond
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+2451