aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d
Commit message (Collapse)AuthorAgeFilesLines
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-286-24/+0
| | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* Complete rewrite of threaded render loop.Gunnar Sletta2013-01-182-5/+0
| | | | | | | | | | | | | | | | This change starts using the superior implementation of the scene graph render loop which has been worked on in the scenegraph-playground project for a while. It uses a far more straightforward locking/sync paradigm compared to the existing one and is less deadlock and error prone. It also enables the scene graph thread to run on its own when the GUI thread is blocked, enabling threaded animations. This changes also introduces a naming change inside Qt Quick from "Window Manager" -> "Render Loop" as that fits better to what the code does. Change-Id: I1c2170ee04fcbef79660bd7dae6cace647cdb276 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Doc: correcting typo "the the"Nico Vertriest2013-01-141-5/+5
| | | | | | | | | | | Task-number: QTBUG-28756 Spurious repetition of the definite article Doc: corrected trailing space issue. Change-Id: I95c1c5773dc4b25dd0a3625343a67975783435fd Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1012-12/+12
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Android also needs <ctype.h> for isspace() to be found.Samuel Rødal2012-09-251-1/+1
| | | | | Change-Id: Ic1299cd8949c37c6909b8d2ab36e930097335a4d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2312-288/+288
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* doc: fix some typos in .cpp filesSergio Ahumada2012-09-071-1/+1
| | | | | Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Use the new antialiasing property for canvas paintingCharles Yin2012-08-289-29/+53
| | | | | Change-Id: I76f21d055696978f2f6936006eea038dd73cce6c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* canvas-related doc fixesBea Lam2012-08-092-170/+179
| | | | | | | | | | - Fully qualify names in \qml* commands - Remove unnecessary 'void' return types in \qmlmethod commands - Remove unnecessary module and type qualifiers from links - Document Canvas::onImageLoaded() Change-Id: I32d1a7a54c407ae98b60857780f5536c6d52fca2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix various broken links in documentationBea Lam2012-08-032-17/+17
| | | | | Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add missing types for canvas related propertiesBea Lam2012-08-021-4/+4
| | | | | Change-Id: I208c5889be2768673637882e58f43f43ed1f28d9 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Refactor context2d thread logicCharles Yin2012-07-317-289/+158
| | | | | | | | | | 1. Use QQuickContext2DRenderThread for Threaded rendering 2. Make FBO target works with all render strategies 3. Remove some unnessary locks, call texture methods by invoking meta calls 4. Run existing tests with all render targets and strategies (except Cooperative) Change-Id: I0db5c91d848b86bcc1536c30d7a5804b66a817f1 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-302-6/+8
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-173-23/+23
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix 'Unknown commands' in qtdeclarative documentation.Yann Bodson2012-07-171-1/+1
| | | | | | Change-Id: I179eb828a84af4feb834bac7159d5e1988cc3deb Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-2/+2
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Compile without RTTI supportEskil Abrahamsen Blomfeldt2012-07-041-2/+4
| | | | | | | | | | | We need to be able to compile without RTTI support. Fortunately QPaintEngine has built-in type info. No RTTI support is the default configuration on Windows with MSVC2010, so this is required to fix the build there. Change-Id: I89b1ed4879fd0e8e0d61ef12d77f6961fd0b07e5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Create new documentation structureChris Adams2012-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Avoid string-based lookup in IS_SIGNAL_CONNECTEDKent Hansen2012-06-101-2/+2
| | | | | | | | | | Specify the signal as a member function suitable for passing to QMetaMethod::fromSignal(), and use the new function QMetaObjectPrivate::signalIndex(QMetaMethod) to get the index in the signal range. Change-Id: If16daa24c2699f7749a17decb611cf395d89d0c4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-062-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Introduce QQuickCanvasPixmapCharles Yin2012-06-057-108/+271
| | | | | | | | | | 1. QQuickPixmap now only store textures instead of QImage data, however context2d still need to access the QImage in some places, so cache the loaded images to avoid the expensive GL readback operations. 2. Use texture directly if the render target is FBO. Change-Id: I6228011e5698fa00f2e3420a3a4a305995b8a238 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix canvas item drawImage bug with FBO render targetCharles Yin2012-06-051-0/+4
| | | | | | | | | | If canvas' render target is FramebufferObject, only the first drawImage() call was successful, it could be fixed by adding beginNativePainting() and endNativePainting(), but this could be unexpected behavior with OpenGL paint engine. task-number: QTBUG-23595 Change-Id: Iff70fc88f6d39655dd283fa5dde3365887910460 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix resizing of Canvas item that use FBO as renderTargets.Charles Yin2012-06-041-0/+5
| | | | | | Change-Id: I2a158e7838f637a662700290f9f4fd28ca726d1e Task-number: QTBUG-25992 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Enable threaded/immediate rendering for FBO(step 1)Charles Yin2012-05-313-6/+62
| | | | | | | | | 1. Create a new gl context if the scenegraph render thread is different with context2d render thread 2. Expose the gl context and window surface from context2d 3. Get the right current gl context before painting Change-Id: I5e252a8142d760442f9dfb53ed8a8ce289379af9 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add missing unintialized member in QV8Context2DResourceCharles Yin2012-05-291-1/+1
| | | | | Change-Id: Id00122fc018cc57f9985163bcdda5d1e036e46d5 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove unreachable code from qquickcontext2d.cppCharles Yin2012-05-291-3/+0
| | | | | Change-Id: Ia084c34ec8f897bdc4a4e4f89f74e6c3dca6c026 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add Q_DISABLE_COPY to QQuickContext2DCharles Yin2012-05-291-0/+2
| | | | | Change-Id: I367bb3b630b916775c1c35656fd74838dbbb00bd Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix potential memory leaks in context2dCharles Yin2012-05-291-4/+12
| | | | | Change-Id: I51e75ed17fd3f12e9ba1bb7777b9f611b06b5d1d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Doc: Sanitized QML typesNico Vertriest2012-05-242-9/+15
| | | | | | | | | | -modified \brief -checked QML modules -added qml directory to the qdocconf file -added particles directory to the qdocconf file Change-Id: I589e32d3106cda37c7fa4d55a941afd9876fc2b2 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* doc fixCharles Yin2012-05-221-2/+2
| | | | | | | renderTarget/renderStrategy property type should be enumeration. Change-Id: I454c5c1d7b5be8290a25b81f8a9b9a54ebf515ec Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-182-2/+2
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Using QStringLiteral or QLatin1String instead of QLatin1LiteralDebao Zhang2012-05-161-15/+15
| | | | | | Change-Id: Ie1435f1ac5c81d8781e7118121ed07c7202ab124 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtQuick: Fix string related warnings, single character strings.Friedemann Kleint2012-05-141-1/+1
| | | | | | | | | - Fix warnings about truncation from size_t to int (MSVC 2010, 64bit). - Remove single character strings. Change-Id: Iaf4406e4e04d55d2d8b762f3433269868842a6f9 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-102-22/+22
| | | | | | | | Ensure comma between elements (16 missing), single space and curly- braces around title elements, etc. Change-Id: I74e5a42e4a7054265c5c8445f8d2e2e6f46d0cf9 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-041-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I03084595ddc425a988374b8352fd23e9504ffba6 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix tile rendering bug for context2dCharles Yin2012-05-041-2/+3
| | | | | | | | | | | aboutToDraw() should be called before checking the painter device, if no device, aboutToDraw() will create a new one. Also just release the FBO when delete tile, not need to release the fbo after each draw. Change-Id: Ida5954f1c65f25f0ce273f732c1608ed49bc148c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add more warningsCharles Yin2012-05-041-2/+6
| | | | | | | | renderTaraget and renderStrategy are not allowed to be modified once context was initialized. Change-Id: Ic0aa493b4e686a063c318a1d1ec912c176e47ed4 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Implement QQuickContext2DRenderThread class for threaded context2d renderingCharles Yin2012-05-042-0/+54
| | | | | Change-Id: I221690c730fd412b23705c0d687d1abbac38974d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Change Qt::MiterJoin to Qt::SvgMiterJoin for context2d joinCharles Yin2012-05-041-1/+1
| | | | | | | Qt::MiterJoin has different behavior with HTML5 context2d spec, fortunately Qt::SvgMiterJoin is the right one. Change-Id: Ice50c6f92b244a4d39f984510f76146682b02f07 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Do not use deprecated APIOlivier Goffart2012-04-241-2/+2
| | | | | | | Change-Id: I0c61f9cb4abe926d5f1e0a3acda7117d8d54efb6 Reviewed-by: Simjees Abraham <simjees.abraham@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Also check notifier endpoints when checking whether a signal is connected.Michael Brasser2012-04-232-1/+7
| | | | | | | This is required for the QQmlBoundSignal optimizations. Change-Id: I63540b96cd7d4523ec49973a2540054c83d82b12 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix the conversion of a colour from a string.Thiago Macieira2012-04-031-1/+1
| | | | | | | | | Don't assume it's HSL just because it isn't RGB. This error was found by GCC's set-but-unused warning. Change-Id: Ie22e1509892163fccb3868fe8ff7091dc7bf5091 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix context2d transform issuesCharles Yin2012-03-303-273/+459
| | | | | | | | | After calling transform related methods, the current path should be transformed with the same method but in reversal mode. So that during painting, the painter will apply the CTM to this path again, otherwise path will be transformed twice. Change-Id: I7e12bdff82dabb408f47152ba07b608872d4093f Task-number: QTBUG-24988 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix compilation on QNX.Tobias Koenig2012-03-201-0/+4
| | | | | Change-Id: I5e01cad23066a645c1434ce1463d370733f53e4f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-132-94/+94
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Change the default renderTarget and renderStrategyCharles Yin2012-03-071-4/+4
| | | | | | | | | | As we always use OpenGL and scenegraph render thread now, the best default render target should be FBO and the best render strategy should be cooperative mode (use the render thread). Task-number:QTBUG-23956 Change-Id: I64b070dec566e359d27c84680fef1c691d6ce411 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Repaint the canvas item properly when canvas resizedCharles Yin2012-03-072-13/+13
| | | | | | Task-number:QTBUG-23594 Change-Id: I703a5190b5b306666ffd61001ff94f296399465f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix texture leaks in QQuickCanvasItemCharles Yin2012-03-071-2/+9
| | | | | | | | | | In commit be4c74948371ddf6f1ed260783b43b5a3d9e60a7 we removed the QQuickCanvasItemNode, but textures are not automatically deleted with QSGSimpleTextureNode, so add a very thin sub class of QSGSimpleTextureNode to just cleanup canvas texture to avoid texture leaks. Change-Id: I31aac1068e8218a75129b52afbbf30fb66e4bbf7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Continue refactor of Canvas rendering.Justin McPherson2012-03-066-49/+49
| | | | | | | | - Remove sync() - not necessary - Queue buffer before flush Change-Id: If7dea8e56a612d241c67a82eae265febc45059a8 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Use NPOT support if available.Justin McPherson2012-03-062-52/+43
| | | | | | | In QQuickContext2DTexture. Change-Id: If0311450658a837b7e2665c041ec2846e3c8c2dd Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>