summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed infinite recursion when drawing very large painter paths.Kim Motoyoshi Kalland2010-06-161-6/+5
| | | | | Task-number: QTBUG-11291 Reviewed-by: Gunnar
* Fixed missing stroke for flat ellipses.Samuel Rødal2010-06-151-0/+1
| | | | | | | The behavior should be the same as for arcs and rects. Task-number: QTBUG-2743 Reviewed-by: Eskil
* Fixed error reporting in grayraster and reduced default pool size.Carolina Gomes2010-06-141-4/+8
| | | | | | | Task-number: QTBUG-10471 Merge-request: 642 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Optimized 90-, 180-, and 270- rotated blits in raster paint engine.Samuel Rødal2010-06-101-0/+105
| | | | | | | | Blitting a 90-degree rotated RGB16 image now takes 40 % of the time it used to on the N900. Task-number: QT-3057 Reviewed-by: Kim
* QRuntimeGraphicsSystemJani Hautakangas2010-05-201-8/+12
| | | | | | | | | | | QRuntimeGraphicsSystem is a proxy graphics system which can dynamically switch underlying graphics system on runtime. For example, switch from hardware accelerated graphics system to raster graphics system on low GPU memory situation. This feature is currently supported on Symbian platform. Task-number: QT-3276 Reviewed-by: Jason Barron
* Avoid changing header dependencies.Warwick Allison2010-05-101-0/+5
| | | | (should fix compile on Symbian)
* Avoid many unnecessary allocations, so so that paint engines attached to pixmapsWarwick Allison2010-05-071-21/+26
| | | | | | | | | do not consume excessive amounts of memory, and so can still be reasonably kept cached with the pixmap. Saves 8K for every pixmaps drawn to on raster paint engine. Saves about 2K for other graphicssystems. Task-number: QTBUG-10215 Reviewed-by: Gunnar
* Fixed image drawing inconsistencies when drawing 1x1 images/subrects.Samuel Rødal2010-04-201-1/+1
| | | | | | | | | | We special cased 1x1 source rects by calling fillRect() with a solid color, but that produces slightly different rasterization leading to gaps when drawing 9-patch images for example. This patch makes us only use the optimized path for scaling transforms or simpler. Task-number: QTBUG-10018 Reviewed-by: Gunnar Sletta
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-04-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtGuiu.def tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
| * Symbol visibility fixes for RVCT4 on SymbianIain2010-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | RVCT 4 is far more strict with regards to symbol visiblity that RVCT 2.2, and will hide symbols unless all references have default visibility in the object files. Update the various places in Qt code where the symbol visibility was set incorrectly for DLL-based platforms (those that use __declspec(dllimport) and (dllexport). Note: QtWebkit and QtScript are fixed in different commits. Task-number: QTBUG-9903 Reviewed-by: Jason Barron
* | Fixed assert failure when drawing dashes with raster engine.Kim Motoyoshi Kalland2010-03-101-5/+6
| | | | | | | | Reviewed-by: Samuel
* | FreeType: Fast lookup of Latin-1 glyphsAndreas Kling2010-03-051-1/+1
| | | | | | | | | | | | Store all glyphs with index < 256 in a pointer array for fast lookup Reviewed-by: Benjamin Poulain
* | doc: mark as reimplemented.Volker Hilsheimer2010-02-241-0/+3
| |
* | Merge remote branch 'origin/master' into qt-master-from-4.6Thiago Macieira2010-02-201-13/+28
|\ \ | |/ |/| | | | | | | | | Conflicts: configure.exe src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp
| * Make QStaticText public API againEskil Abrahamsen Blomfeldt2010-02-101-1/+1
| | | | | | | | | | QStaticText was previously made private API to support inclusion in Qt 4.6.x. This change turns it back into public API for Qt 4.7.0.
| * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Eskil Abrahamsen Blomfeldt2010-02-041-1/+8
| |\ | | | | | | | | | qstatictext-4.6
| * | Make QStaticText private APIEskil Abrahamsen Blomfeldt2010-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Turns QStaticText into private API in preparation for Qt 4.6.x. The related functions in QPainter are marked as internal in the docs. There are already internal functions in QPainter, so this seemed like a reasonable solution. Since the functions require QStaticText they will not be accessible to anyone who does not include private API.
| * | Implement drawStaticTextItem() in OpenGL paint enginesEskil Abrahamsen Blomfeldt2010-01-141-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OpenGL and OpenGL2 engines now have support for static text, as well as the QEmulationPaintEngine. Also contains an optimization: Instead of passing both the position and glyph positions to drawStaticTextItem() we add the position into the glyph position and update it only when it changes. Otherwise we would have to do this work in all engines for every call. This means we have to cache the position in QStaticTextPrivate as well, but it seems like a small price to pay, since it's a per-text overhead and only 16 bytes.
| * | Support transformations in drawStaticText() and optimize for spaceEskil Abrahamsen Blomfeldt2010-01-141-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fixed autotest failure in tst_QPainter::drawEllipse on Maemo.Samuel Rødal2010-02-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous fix (baa7c3bdecc) attempted to fall back to path drawing in QPainter::drawEllipse, however we have some specific filling rules for aliased ellipse drawing in the raster paint engine. We should use the (now free of fixed point math) drawEllipse_midpoint_i function on all platforms. Reviewed-by: Gunnar Sletta
* | | Fixed autotest failure in tst_QGraphicsScene::render on Maemo.Samuel Rødal2010-02-171-14/+4
| |/ |/| | | | | | | | | | | | | The fixed point code in the raster paint engine's drawEllipse() function causes rendering errors on ARM. Remove untested code and use the vector path fallback instead. Reviewed-by: Gunnar Sletta
* | Fixed text rendering via scaled QPainter on rasterPaintEngine / SymbianAlessandro Portale2010-02-011-1/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | Text rendering in Qt for Symbian looks very bad on a scaled QPainter. Instead of simply using a Symbian font with the right size it followed the code path that is usually used for "tricky transformation": Use the glyph outlines and rasterize them in Qt as QPainterPath. That's slow and especially ugly on Symbian since we do not (yet) get the glyph outlines from Symbian. This patch adds QFontEngineS60::setFontScale() so that QFontEngineS60 has one additional native font handle with the scaled size. The raster paint engine will call that function in case that the painter is scaled. Since we already have QFontEngineS60 specific code in the raster paint engine, this patch did not have to add #ifdefs. http://bugreports.qt.nokia.com/browse/QTBUG-7614 Task-number: QTBUG-7614 Reviewed-by: Jason Barron modified: gui/painting/qpaintengine_raster.cpp modified: gui/text/qfontengine_s60.cpp modified: gui/text/qfontengine_s60_p.h
* Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-121-1/+1
|\ | | | | | | | | Conflicts: dist/changes-4.6.1
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Avoid coordinate limitations in the raster engine.Gunnar Sletta2010-01-121-1/+3
|/ | | | | | | | | Lines that are longer than 2^15 will overflow in qgrayraster.c so we need to clip them. Also, we need to clip the bounding rectangle to avoid an endless clip-loop Task: http://bugreports.qt.nokia.com/browse/QTBUG-6198 Reviewed-by: Samuel
* Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-101-2/+2
| | | | Reviewed-by: Eskil
* Fixed square root of negative number in drawTextItem().Kim Motoyoshi Kalland2009-11-301-1/+2
| | | | | | | | | Fixed potential bug where you could end up taking the square root of a negative number in drawTextItem() in the raster and OpenGL paint engines. Task-number: QTBUG-6327 Reviewed-by: Trond
* API review: Rename numRects() -> rectCount()Marius Storm-Olsen2009-11-091-2/+2
| | | | | | | QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* Fix raster paintengine handling with invalid imagesChristoph Feck2009-10-281-0/+3
| | | | | | | | | | | | | | | | | | | initTexture() has explicit handling of invalid images, but when calling adjustSpanMethods() the invalid case is not handled for Type == Texture. This caused two types of crashes: * call to 0 address, because sourceFetch[] has 0 pointer for QImage::Format_Invalid (see https://bugs.kde.org/show_bug.cgi?id=176014) * division by zero in tiled blend functions, because of the " % image_size" modulo arithmetic. (see https://bugs.kde.org/show_bug.cgi?id=203231) Merge-request: 1213 Reviewed-by: Samuel Rødal <sroedal@trolltech.com>
* Reworked QVectorPath API to allow for caching and convex curved shapesGunnar Sletta2009-10-271-1/+1
|
* Removed a redundant if() check. Its checked in the containing conditionGunnar Sletta2009-10-271-2/+1
| | | | Reviewed-by: Samuel
* Properly detect font smoothing setting on Mac OS X in raster engineEskil Abrahamsen Blomfeldt2009-10-211-1/+5
| | | | | | | | | | | We would assume font smoothing on the mac was always turned on, giving poor text rendering in the cases where it was not. This implementation mirrors querying the cleartype setting on Windows, checking the setting on application initialization and rendering into an 8 bit cache if it is turned off. Task-number: QTBUG-4881 Reviewed-by: Morten Johan Sørvig
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-191-8/+1
|\
| * qt_paint_device_metric() for fetching metricsRhys Weatherley2009-10-151-8/+1
| | | | | | | | | | | | | | | | | | | | Custom window surfaces, graphics systems, and Qt/Embedded screen drivers often need to access QPaintDevice::metric(), but it is protected. Hence the growing number of friends in QWidget and QImage. The qt_paint_device_metric() function provides a more future-proof approach that doesn't require lots of friends. Reviewed-by: Gunnar
* | Fixed bug where bitmaps were painted black instead of in pen colour.Kim Motoyoshi Kalland2009-10-131-0/+2
|/ | | | | | | | penData and the pen painter state were not in sync when drawing bitmaps in the raster paint engine. Adding calls to ensurePen() fixed the bug. Task-number: QTBUG-4210 Reviewed-by: Trond
* Fixed ellipsedrawing in raser engine for rects over 2^15 in sizeGunnar Sletta2009-09-221-0/+1
| | | | Reviewed-by: Samuel
* Switch glyph cache from Qt to SymbianLiang QI2009-09-181-2/+43
| | | | | | | Use Symbian glyph cache directly in QRasterPaintEngine, do not need cache them in Qt if on Symbian Platform. Reviewed-by: Alessandro Portale Reviewed-by: Jason Barron
* Merge branch '4.5' into 4.6Tom Cooksey2009-09-171-1/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qpainter/tst_qpainter.cpp tests/auto/qtwidgets/tst_qtwidgets.cpp
| * Fix crash or painting error when drawing dashed lines with penWidth > 1Eskil Abrahamsen Blomfeldt2009-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the width is multiplied into the dash, it needs to be divided out, otherwise you can get a dashOffset which is greater than the pattern at the index, and the dash can become negative. This will in turn lead to passing a negative width to the rasterizer, which at some point will get cast to an unsigned int and overflow. Depending on the position of the line and size of the buffer, this will either crash or produce garbled output. Task-number: QT-4444 Reviewed-by: Samuel
| * Update license headers again.Jason McDonald2009-09-081-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Fixed compilation of some ifdef'ed out debug messages.Gunnar Sletta2009-09-141-8/+13
| | | | | | | | Reviewed-by: trustme
* | Made raster respect SmoothPixmapTransform and Antialiasing hints better.Samuel Rødal2009-09-101-14/+5
| | | | | | | | | | | | | | | | SmoothPixmapTransform shouldn't imply Antialiasing for image / pixmap drawing, since the render hints are fully orthogonal. Task-number: 256967 Reviewed-by: Trond
* | Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | | | | | Reviewed-by: Trust Me
* | Fixed some clipping bugs in raster paint engine.Samuel Rødal2009-09-031-7/+7
| | | | | | | | | | | | | | | | | | | | Clip against the correct base region in clip(const QRegion &, ...) and make sure to not access QClipData's clipRect unless hasRectClip is true. This fixes the tst_QWidget::render_systemClip3() autotest, and the clipping bugs in Qt Creator. Task-number: 260666 Reviewed-by: Gunnar Sletta
* | 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
| * Fixed rounding error in fillRect() in the raster paint engineEskil Abrahamsen Blomfeldt2009-08-181-11/+7
| | | | | | | | | | | | | | | | | | | | | | Problem introduced by 7661126bc86ed105c02fd9b084ac5a91f12f10c4, which introduced always rounding up when converting the rectangle's coordinates to integers. This would e.g. cause off-by-one errors for the cursor in QTextDocument. Some code paths depended on the ceiling of the coordinates, and these have been reverted. Task-number: 257914 Reviewed-by: Samuel
| * Update license headers.Jason McDonald2009-08-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Remove superfluous '.data()' call from dashStroker.Jason Barron2009-08-261-1/+1
| | | | | | | | | | | | | | The extra ".data()" call is not needed here because QScopedPointer overloads operator!() to do the right thing here. Reviewed-by: Eskil Blomfeldt