summaryrefslogtreecommitdiffstats
path: root/src/openvg/qpaintengine_vg.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Ensure glyphs are upright instead of upside-down.Jason Barron2010-07-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The OpenVG paint engine traditionally takes glyph images from the alphaMapForGlyph() function which returns the glyph image in the upright projection. When it constructs a VGImage from this image, it passes a positive data stride which will read the top scanline of the source image into the bottom scanline of the VGImage due to the VG coordinate system. It then uses the path transform where the 'sy' value of the matrix is set to -1 and this re-inverts everything when drawing. With the Symbian based glyph cache, the VGImage is constructed from a RSgImage which is a hardware resource and compensates for the coordinate system used by VG and GL at the time it is created. In the case of the hardware glyph cache, the glyph image is read into the RSgImage using a negative data stride so it does not need to be inverted when drawn. To allow for this, introduce a flag which indicates that the 'sy' entry of the matrix should be flipped such that the glyph is drawn normally. Also in this patch is a change to the glyph origin which now uses the bottom of the glyph metric bounding rect instead of the top due to orientation of the glyph inside the VGImage. Reviewed-by: Alessandro Portale
* Enable cross-process glyph cache for OpenVG graphics system on Symbian.Jason Barron2010-07-121-0/+4
| | | | | | | | | | | This introduces a specialized OpenVG font cache for the Symbian platform. By using RGlyphDataIterator we can create a VGImage to store inside a VGFont without having to upload our own glyph image. This works by utilizing RSgImage which can be used to share handles to graphics memory across processes thus allowing glyph images to be shared by multiple processes and reducing graphics memory usage. Reviewed-by: Alessandro Portale
* Move QVGFontGlyphCache from source file into a separate headerJason Barron2010-07-121-18/+1
| | | | | | | Needed in order to subclass and override in the Symbian specific implementation. Reviewed-by: Rhys Weatherley
* Make cacheGlyphs() function (and the destructor) virtual.Jason Barron2010-07-121-2/+2
| | | | | | | | This class will be implemented differently on Symbian due to the presence of a class that allows cross process sharing of glyph images so make this function virtual. Reviewed-by: Rhys Weatherley
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-06-081-4/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/painting/qpainter.cpp src/gui/painting/qtextureglyphcache.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qfontmetrics/tst_qfontmetrics.cpp tools/linguist/lupdate/main.cpp
| * Clipping with rounded rectangles and QVG_SCISSOR_CLIPRhys Weatherley2010-06-021-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WebKit draws rounded rectangles by setting a rounded rect path as a clip and then filling the clip. This had problems when QVG_SCISSOR_CLIP was enabled because the scissor would only clip to the bounding box of complex paths. Thus, rounded rectangle clips were turned into normal rectangle clips. This change will make the scissor clipping code subdivide complex paths into rectangles and use a tighter clip if the number of rectangles is less than or equal to VG_MAX_SCISSOR_RECTS. If it is greater, then it will fall back to the bounding box of the path. Task-number: QT-3372 Reviewed-by: Jason Barron
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-4/+83
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * OpenVG blending modes from VG_KHR_advanced_blending extensionRhys Weatherley2010-05-121-4/+83
| | | | | | | | | | | | | | | | | | | | This change introduces the extra blending modes that are defined in the VG_KHR_advanced_blending extension. Patch originally provided by contributor: http://qt.gitorious.org/qt/qt/merge_requests/505 Reviewed-by: Julian de Bhal
* | Apply Rhys's fix to qpaintengine_vg.cpp to make it compileThiago Macieira2010-04-271-5/+5
| |
* | Attempt again at fixing the OpenVG paint engine buildThiago Macieira2010-04-261-7/+9
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-221-32/+22
|\ \ | |/ | | | | | | Conflicts: src/openvg/qpaintengine_vg.cpp
| * correctly position glyphs for complex languagesLars Knoll2010-04-211-32/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | Correctly use the positions calculated by getGlyphPositions to draw the glyphs. Simplify the logic a bit so that we don't need the glyphTransform anymore, but can instead just use the pathTransform for text drawing as well. Tested with latin, arabic, hebrew and Hindi text Task-number: QT-3300 Reviewed-by: Jason Barron
* | Revert "Attempt at fixing compile failure introduced by 4.6 merge in ↵Thiago Macieira2010-04-221-3/+3
| | | | | | | | | | | | qpaintengine_vg.cpp" This reverts commit 27688a5e317f6602752eaea257ba46abbc9acf44.
* | Attempt at fixing compile failure introduced by 4.6 merge in qpaintengine_vg.cppThiago Macieira2010-04-221-3/+3
| |
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-211-3/+7
|\ \ | |/ | | | | | | | | | | Conflicts: src/openvg/qpaintengine_vg.cpp src/script/bridge/qscriptqobject_p.h tests/auto/bic/tst_bic.cpp
| * Fix RTL text rendering in the QVGPaintEngineAlessandro Portale2010-04-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QVGPaintEngine calls vgDrawGlyphs() to draw the glyphs of a QTextItem. vgDrawGlyphs(), which is an official OpenVG function, and not implemented in Qt itself, expects glyphs coordinates differently than Qt's glyph painting loops of other paint engines expect. Therefore, we need to handle RTL text separately in QVGPaintEngine::drawTextItem(). Rhys Weatherley provided this patch. This issue is not Symbian specific, but rather QVGPaintEngine specific. Task-number: QT-3140 Reviewed-by: Rhys Weatherley
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-04-161-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-311-19/+22
|\ \ | |/ | | | | | | | | | | | | Conflicts: configure doc/src/modules.qdoc src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicswidget.h
| * Another "off by 1" problem in OpenVG - in paths this time.Rhys Weatherley2010-03-301-19/+22
| | | | | | | | | | | | | | | | | | Summary so far: paths and images do not need the 0.5 adjustment to the transform, but glyphs do. Not sure why glyphs do, but the fonts definitely look wrong without the adjustment. Task-number: QT-3192 Reviewed-by: trustme
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-03-291-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: mkspecs/common/symbian/symbian.conf qmake/generators/symbian/symmake.cpp src/3rdparty/webkit/WebCore/WebCore.pro
| * Fix another off-by-1 error in OpenVG image painting.Rhys Weatherley2010-03-251-1/+1
| | | | | | | | | | | | | | Off in the vertical direction this time; previously was horizontal. Task-number: QT-2999 Reviewed-by: Jason Barron
* | Fix compilation of OpenVG paint engine with OpenVG 1.0Rhys Weatherley2010-03-141-0/+9
| | | | | | | | Task-number: QTBUG-9006
* | Renamed QPainter::Fragment/Hint -> QPainter::PixmapFragment/HintTrond Kjernåsen2010-03-091-2/+2
| | | | | | | | Reviewed-by: Kim
* | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Rohan McGovern2010-03-061-76/+72
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe examples/multimedia/audioinput/audioinput.cpp src/corelib/io/qfsfileengine.cpp src/gui/egl/qegl_wince.cpp src/gui/egl/qeglproperties.cpp src/gui/egl/qeglproperties_p.h src/gui/embedded/directfb.pri src/gui/kernel/qapplication_win.cpp src/gui/painting/qdrawutil.cpp src/opengl/qgl_p.h src/sql/drivers/odbc/qsql_odbc.cpp src/sql/drivers/odbc/qsql_odbc.h tests/auto/auto.pro tests/auto/qgl/tst_qgl.cpp translations/assistant_adp_ru.ts
| * Image drawing in OpenVG was off by 0.5 of a pixelRhys Weatherley2010-03-051-9/+14
| | | | | | | | | | | | | | | | | | Path transforms need to be adjusted by 0.5 for the difference in OpenVG and Qt co-ordinate systems. Image transforms do not need to be adjusted because OpenVG implicitly adjusts by 0.5. Task-number: QT-2999 Reviewed-by: Sarah Smith
| * When using OpenVG alpha mask, turn off scissor-as-maskRhys Weatherley2010-03-051-0/+1
| | | | | | | | | | Task-number: QT-3033 Reviewed-by: Julian de Bhal
| * Remove vgClearPath() change to OpenVG paint engineRhys Weatherley2010-03-031-67/+57
| | | | | | | | | | | | | | | | | | Upon further investigation, vgClearPath() doesn't help as much on target devices as just making a new path. Revert "Improve performance of VGPath creation by reusing the same path" This reverts commit 8597e03495f54614e53c6063f1f13077a08109fd.
* | Move qegl_p.h -> qeglcontext_p.h and add a new qegl_p.hTom Cooksey2010-03-021-1/+1
| | | | | | | | | | | | | | | | This puts the QEgl namespace in a single file which can be used by both qeglcontext and qeglproperties. Files which need QEglContext should now include qeglcontext_p.h. Reviewed-By: Aleksandar Sasha Babic
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into master-s60axis2010-02-261-59/+69
|\ \ | |/ | | | | | | | | Conflicts: qmake/generators/symbian/initprojectdeploy_symbian.cpp qmake/generators/symbian/symmake_abld.h
| * Improve performance of VGPath creation by reusing the same pathRhys Weatherley2010-02-221-57/+67
| | | | | | | | | | | | | | | | The vgClearPath() function can be used to clear a path for reuse more efficiently than destroying the path and creating a new one. Task-number: QT-2974 Reviewed-by: Daniel Pope
| * Don't use vgClear() for semi-transparent brushes.Jason Barron2010-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the brush is not totally opaque we should not use vgClear() at this point because vgClear() does not support blending. Instead it writes the values directly into the surface which clobbers any existing content. The bug exhibits itself when a child widget fills itself with any transparent color. Instead of blending with the parent widget's content, it writes the semi-transparent color directly to the surface, overwriting the parent content and leaving the surface in a somewhat undefined state because the alpha channel is not honoured unless Qt::WA_TranslucentBackground is set. Task-number: QTBUG-8007 Reviewed-by: Rhys Weatherley
* | Fix compilation error in openVGOlivier Goffart2010-02-231-1/+1
| | | | | | | | After 58533cbc7322c4f821f2
* | Made the qDrawPixmaps() API public (with modifications).Trond Kjernåsen2010-02-231-12/+12
| | | | | | | | | | | | | | | | | | QPainter has now gotten a drawPixmapFragments() function together with a Fragment class that describes how each pixmap fragment is supposed to be drawn. Reviewed-by: Gunnar Reviewed-by: Samuel
* | Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7Eskil Abrahamsen Blomfeldt2010-02-151-12/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7 Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp Merge branch 'master' of scm.dev.troll.no:qt/oslo-staging-2 into qstatictext-4.7 Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tests/auto/qlineedit/tst_qlineedit.cpp
| * \ Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-091-11/+65
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: src/gui/kernel/qcocoapanel_mac.mm src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
| * | Replace qt_vg_imageBits() with constBits() in the OpenVG codeRhys Weatherley2010-02-081-12/+9
| | | | | | | | | | | | Reviewed-by: Sarah Smith
* | | 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-11/+65
|\ \ \ | | |/ | |/| | | | qstatictext-4.6
| * | Use OpenVG scissor on 90/180/270 rotations and simple clips.Rhys Weatherley2010-02-041-7/+23
| | | | | | | | | | | | | | | Task-number: QTBUG-7864 Reviewed-by: Sarah Smith
| * | Optimize single-rect IntersectClip in OpenVG using the scissorRhys Weatherley2010-02-041-4/+42
| |/ | | | | | | | | Task-number: QTBUG-7791 Reviewed-by: Sarah Smith
* | 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.
* | Compile for S60Eskil Abrahamsen Blomfeldt2010-01-261-13/+17
| | | | | | | | Make the OpenVG code for QStaticText compile.
* | Attempt at making OpenVG work with QStaticTextEskil Abrahamsen Blomfeldt2010-01-261-25/+34
|/ | | | | Done in the blind, so I don't expect this to compile, but it's to make it easier to get it over into a Symbian-ready repository.
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Avoid deep QImage copies in the OpenVG paint engineRhys Weatherley2010-01-041-8/+11
| | | | | | | | | | Task-number: QTBUG-7015 Reviewed-by: Daniel Pope
* | Reset the OpenVG scissor after a native painting call-outRhys Weatherley2010-01-041-2/+11
|/ | | | | Task-number: QTBUG-7051 Reviewed-by: Daniel Pope
* Add an image allocation pool to the OpenVG paint engineRhys Weatherley2009-12-151-4/+12
| | | | | | | | | | | | | Some OpenVG GPU's have limitations on the amount of memory available to create VGImage's. When the memory runs out, vgCreateImage() will fail. This change introduces QVGImagePool, which keeps track of all QVGPixmapData image allocations and ejects least-recently-used pixmaps when GPU memory is exhausted. Task-number: QT-2554 Reviewed-by: trustme
* Fix infinite recursion in OpenVG scissor-only clippingRhys Weatherley2009-11-271-12/+0
| | | | | | | | | | | When a complex transform was set, clip(QVectorPath) would call clip(QRect) with the control point rect, which would then turn around and say "transform is complex, call clip(QVectorPath)", causing an infinite loop until stack crash. Remove the "fall back to vector path" case as it isn't useful for scissor-only clipping. Doesn't affect mask-based clipping. Reviewed-by: Sarah Smith