summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtextureglyphcache_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | 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>
* 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>
* 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
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Optimize texture glyph cacheEskil Abrahamsen Blomfeldt2010-12-211-0/+5
| | | | | | | | | | | | | | | | | | | | To avoid calling the bounding box function for the same non-printable characters in every call, we cache them as empty in the coords table and bail out before painting them. This patch also fixes some possible reads of uninitialized memory (reference to return value) and reference to a default constructed object consisting of uninitialized pods. Reviewed-by: Samuel
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-251-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/symbian/symmake.cpp src/corelib/global/qglobal.h src/gui/kernel/qwidget_p.h src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/plugins/qpluginbase.pri src/qbase.pri tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp tests/auto/qthread/tst_qthread.cpp tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * Fix possible missing glyphs in raster engine glyph cacheEskil Abrahamsen Blomfeldt2010-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two possible failures when using the glyph cache on raster engine and populating the cache with very many glyphs: 1. Change 72f161739b270b01807f97cd853030440f0fd430 caused the maximum height of the glyph cache to be 32768, which was not sufficient for large fonts with very many characters (e.g. Chinese text) 2. Since we are using QPainter to draw into the glyph cache for RGB32 glyphcaches, and QPainter does not support very high coordinates, we need to create a reference image that references a section of the glyph cache and paint into that instead. Task-number: QT-3971 Reviewed-by: Samuel
| * Fix possible corrupted text when gl glyph cache becomes fullEskil Abrahamsen Blomfeldt2010-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the OpenGL glyph cache filled up (the max texture size on the hardware was exceeded) the characters would be drawn as black blocks instead. As a work-around for this, the cache will now be cleared and repopulated whenever this happens, meaning that once in a while (when a lot of different glyphs have been drawn in a font) there will be a performance hit. A more complete solution is described in QTBUG-13784, but this requires so much refactoring that it was deemed too risky for a patch release. This patch fixes the problem with a small penalty and low risk. Task-number: QT-3971 Reviewed-by: Samuel
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-221-0/+6
|\ \ | |/ | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache_p.h src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
| * Fixed drawing a large number of glyphs with the same font under GL.Trond Kjernåsen2010-09-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our glyph caching system doesn't take GL texture size limitation into account, and assumes you can create an infinitely large texture. On top of that, the cache will never create a cache that is wider than 256, or QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, which means we'll hit the texture size limit even faster. With this patch the entire texture is utilized. However, to fix in properly we need to support having multiple texture for each font engine. That will be fixed shortly (see task QTBUG-13784). Task-number: QT-3971 Reviewed-by: Eskil
* | Support sub pixel positioning of glyphs in raster engineEskil Abrahamsen Blomfeldt2010-09-091-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the raster engine to provide the same quality of text rendering as the native engine on Mac Cocoa, we need to support rendering to different sub pixel positions for each glyph. The number of subpixel positions is arbitrary and has to be detected, but it's usually three or four. Each position will give slightly different coverages inside the pixel and thus different rasterizations. Other font engines which support sub pixel positioning of glyphs can provide the same functionality by implementing supportsSubPixelPositions() to return true, and then adding the subPixelPosition argument to the x coordinate used in alphaRGBMapForGlyph(). Task-number: QTBUG-5053 Reviewed-by: Jiang Jiang
* | Refactor QTextureGlyphCacheEskil Abrahamsen Blomfeldt2010-06-211-1/+11
|/ | | | | | | | | | | | | | Separate getting the glyph coordinates from actually making and populating the cache. Calling populate() and fillInPendingGlyphs() immediately after should be equivalent to the old code, except it might have fewer reallocations of the texture since you will only create it one per set of glyphs. This mainly enables populating the GL glyph cache outside a GL context and then actually drawing into it later, when the context has actually been established. Reviewed-by: Kim
* Fix textdrawing under GL on N900.Gunnar Sletta2010-05-071-1/+1
| | | | | | | | | | | | | | | | The driver in the N900 doesn't support glCopyTexSubImage or glReadPixels for FBO's that have a GL_ALPHA or POT color attachment. The ifdef'ed code in resize() was a previous attempt to make this work which didn't. We could have changed the texture to be GL_RGBA and changed the texture size to be NPOT, but that would have wasted precious GPU memory and would have been slower, so we waste a bit of system memory instead, by having a QImage copy along with the texture. Reviewed-by: Eskil Reviewed-by: Trond
* Fix antialiasing with transformed text in OpenGL2 paint engineEskil Abrahamsen Blomfeldt2010-04-121-0/+1
| | | | | | | | | | | | | | Since the paint engine now transforms the prerendered glyphs instead of rendering transformed glyphs as paths, we need to turn on texture filtering to avoid antialiasing artifacts. In order to do this, we also need to pad the glyphs in the glyph cache, otherwise you will get artifacts when sampling the area around the glyph's bounding rect (where there might be other glyphs.) This done by adding a glyphPadding() function to the cache which returns the number of pixels to pad between each glyph. Task-number: QTBUG-9706 Reviewed-by: Tom
* Fix painting artifacts on textEskil Abrahamsen Blomfeldt2010-04-061-1/+2
| | | | | | | | | | | | | | The height of the row is not only decided by the maximum height of the set of glyphs currently being added to the glyph cache, but also the height of the glyphs previously added to the current line in the glyph cache. To minimize the space used, we now calculate the maximum height for glyphs per line, and use this as the vertical advancement when positioning the next line in the cache. The change also removes a redundant test ((c_x + c.w > c.h) is caught earlier on and will always be false at this point.) Task-number: QTBUG-9176 Reviewed-by: Trond
* Fix warnings on gccEskil Abrahamsen Blomfeldt2010-02-181-2/+3
| | | | | | Gcc warns if declaration and initialization order are different. Reviewed-by: Samuel
* Support transformations in drawStaticText() and optimize for spaceEskil Abrahamsen Blomfeldt2010-01-141-3/+2
| | | | | | | | | | 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-3/+4
| | | | | | | | | | | 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.
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-091-4/+1
| | | | Reviewed-by: Eskil
* 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
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Port of Qt to VxWorksRobert Griebl2009-07-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes Qt work on VxWorks 6.6+ in native (kernel) mode. * compiles with the WindRiver GNU toolchain (Linux only) * works with QWS (tested with the VNC driver only) * tested on PPC hardware and the x86 VxWorks simulator * no q3support, no phonon, no webkit * no QSharedMemory, no QSystemSemaphore, no QProcess * only one QApplication instance (flat address space) * filesystem support depends heavily on the quality of the native driver * QLibrary is just a dummy to make plugins work at all * qmake transparently creates VxWorks munching rules for static ctors * made auto-test cope with missing OS features A special note regarding the Q_FOREACH patch for dcc: when calling foreach(a,c) with c being a function returning a container, the compiler would generate 5 references to some labels (.LXXXX), which are not there (so the linker complains in the end). Seems like dcc doesn't really like the 'true ? 0 : <function call to get type>' statement Reviewed-By: Harald Fernengel
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
| * Long live Qt 4.5!Lars Knoll2009-03-231-0/+141
|
* small changes in private headersThierry Bastian2009-06-091-1/+1
|
* Implemented QGLTextureGlyphCache to avoid wasting glyph cache memory.Samuel Rødal2009-06-031-1/+2
| | | | | | | | | Now there's only a copy of the texture glyph cache in graphics memory, avoiding the system memory copy that we used earlier. In addition the texture will use the GL_ALPHA texture format when possible, making it consume less graphics memory as well. Reviewed-by: Tom
* Long live Qt!Lars Knoll2009-03-231-0/+141