From 1fd06d1ecf588a1ac4bf6bc4f9eed5f95d4e7982 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 12 Aug 2014 11:36:26 +0200 Subject: Correct strokeRect documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I81c61f3b32819e45e15b2be472e71e48fac0c148 Reviewed-by: Topi Reiniö --- src/quick/items/context2d/qquickcontext2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 7964f650d6..3cc4dd04ad 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -2170,7 +2170,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillRect(QV4::CallContext } /*! - \qmlmethod object QtQuick::Context2D::fillRect(real x, real y, real w, real h) + \qmlmethod object QtQuick::Context2D::strokeRect(real x, real y, real w, real h) Stroke the specified rectangle's path using the strokeStyle, lineWidth, lineJoin, and (if appropriate) miterLimit attributes. -- cgit v1.2.3 From da7df10b3d5769d1da7851895d27257a0d930012 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 12 Aug 2014 15:06:04 +0200 Subject: Disable threaded FBO canvas drawing when not supported. Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518 Reviewed-by: J-P Nurmi Reviewed-by: Laszlo Agocs Reviewed-by: Alan Alpert --- src/quick/items/context2d/qquickcontext2d.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 3cc4dd04ad..e7eef048cc 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -70,6 +70,9 @@ #include #include +#include +#include + #include #if defined(Q_OS_QNX) || defined(Q_OS_ANDROID) @@ -4156,6 +4159,13 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args } #endif + // Disable threaded background rendering if the platform has issues with it + if (m_renderTarget == QQuickCanvasItem::FramebufferObject + && m_renderStrategy == QQuickCanvasItem::Threaded + && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) { + m_renderTarget = QQuickCanvasItem::Image; + } + switch (m_renderTarget) { case QQuickCanvasItem::Image: m_texture = new QQuickContext2DImageTexture; -- cgit v1.2.3 From e05ba6967edfe288044d6c397fbb541c67eddead Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 11 Aug 2014 16:41:02 +0200 Subject: Ignore extra arguments passed to Context2D functions. This is in line with what Chrome, Firefox and IE do. This is also how most JavaScript functions in Qt behave by default (for example, TableView::resizeColumnsToContents()). Task-number: QTBUG-40703 Change-Id: I087221e305dcb5fd6709ad4a99a5163d641faac6 Reviewed-by: Simon Hausmann --- src/quick/items/context2d/qquickcontext2d.cpp | 94 +++++++++++++-------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index b153fc25b2..1a0d6287aa 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -1056,7 +1056,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_rotate(QV4::CallContext *c QV4::Scoped r(scope, ctx->d()->callData->thisObject.as()); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 1) + if (ctx->d()->callData->argc >= 1) r->d()->context->rotate(ctx->d()->callData->args[0].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -1085,7 +1085,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_scale(QV4::CallContext *ct CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 2) + if (ctx->d()->callData->argc >= 2) r->d()->context->scale(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -1131,7 +1131,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_setTransform(QV4::CallCont CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 6) + if (ctx->d()->callData->argc >= 6) r->d()->context->setTransform( ctx->d()->callData->args[0].toNumber() , ctx->d()->callData->args[1].toNumber() , ctx->d()->callData->args[2].toNumber() @@ -1159,7 +1159,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_transform(QV4::CallContext QV4::Scoped r(scope, ctx->d()->callData->thisObject.as()); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 6) + if (ctx->d()->callData->argc >= 6) r->d()->context->transform( ctx->d()->callData->args[0].toNumber() , ctx->d()->callData->args[1].toNumber() , ctx->d()->callData->args[2].toNumber() @@ -1185,7 +1185,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_translate(QV4::CallContext QV4::Scoped r(scope, ctx->d()->callData->thisObject.as()); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 2) + if (ctx->d()->callData->argc >= 2) r->d()->context->translate(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -1223,7 +1223,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_shear(QV4::CallContext *ct QV4::Scoped r(scope, ctx->d()->callData->thisObject.as()); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 2) + if (ctx->d()->callData->argc >= 2) r->d()->context->shear(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); @@ -1538,7 +1538,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createLinearGradient(QV4:: QV8Engine *engine = scope.engine->v8Engine; - if (ctx->d()->callData->argc == 4) { + if (ctx->d()->callData->argc >= 4) { qreal x0 = ctx->d()->callData->args[0].toNumber(); qreal y0 = ctx->d()->callData->args[1].toNumber(); qreal x1 = ctx->d()->callData->args[2].toNumber(); @@ -1584,7 +1584,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createRadialGradient(QV4:: QV8Engine *engine = scope.engine->v8Engine; - if (ctx->d()->callData->argc == 6) { + if (ctx->d()->callData->argc >= 6) { qreal x0 = ctx->d()->callData->args[0].toNumber(); qreal y0 = ctx->d()->callData->args[1].toNumber(); qreal r0 = ctx->d()->callData->args[2].toNumber(); @@ -1638,7 +1638,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createConicalGradient(QV4: QV8Engine *engine = scope.engine->v8Engine; - if (ctx->d()->callData->argc == 3) { + if (ctx->d()->callData->argc >= 3) { qreal x = ctx->d()->callData->args[0].toNumber(); qreal y = ctx->d()->callData->args[1].toNumber(); qreal angle = DEGREES(ctx->d()->callData->args[2].toNumber()); @@ -1712,7 +1712,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_createPattern(QV4::CallCon QV8Engine *engine = scope.engine->v8Engine; - if (ctx->d()->callData->argc == 2) { + if (ctx->d()->callData->argc >= 2) { QV4::Scoped pattern(scope, scope.engine->memoryManager->alloc(scope.engine)); QColor color = engine->toVariant(ctx->d()->callData->args[0], qMetaTypeId()).value(); @@ -2093,7 +2093,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_clearRect(QV4::CallContext CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) + if (ctx->d()->callData->argc >= 4) r->d()->context->clearRect(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), @@ -2113,7 +2113,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillRect(QV4::CallContext QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) + if (ctx->d()->callData->argc >= 4) r->d()->context->fillRect(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), ctx->d()->callData->args[3].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -2134,7 +2134,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeRect(QV4::CallContex QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) + if (ctx->d()->callData->argc >= 4) r->d()->context->strokeRect(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), ctx->d()->callData->args[3].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); @@ -2218,7 +2218,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_arcTo(QV4::CallContext *ct QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 5) { + if (ctx->d()->callData->argc >= 5) { qreal radius = ctx->d()->callData->args[4].toNumber(); if (qIsFinite(radius) && radius < 0) @@ -2276,7 +2276,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_bezierCurveTo(QV4::CallCon CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 6) { + if (ctx->d()->callData->argc >= 6) { qreal cp1x = ctx->d()->callData->args[0].toNumber(); qreal cp1y = ctx->d()->callData->args[1].toNumber(); qreal cp2x = ctx->d()->callData->args[2].toNumber(); @@ -2376,7 +2376,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_lineTo(QV4::CallContext *c CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 2) { + if (ctx->d()->callData->argc >= 2) { qreal x = ctx->d()->callData->args[0].toNumber(); qreal y = ctx->d()->callData->args[1].toNumber(); @@ -2400,7 +2400,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_moveTo(QV4::CallContext *c QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 2) { + if (ctx->d()->callData->argc >= 2) { qreal x = ctx->d()->callData->args[0].toNumber(); qreal y = ctx->d()->callData->args[1].toNumber(); @@ -2424,7 +2424,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_quadraticCurveTo(QV4::Call QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) { + if (ctx->d()->callData->argc >= 4) { qreal cpx = ctx->d()->callData->args[0].toNumber(); qreal cpy = ctx->d()->callData->args[1].toNumber(); qreal x = ctx->d()->callData->args[2].toNumber(); @@ -2450,7 +2450,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_rect(QV4::CallContext *ctx QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) + if (ctx->d()->callData->argc >= 4) r->d()->context->rect(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), ctx->d()->callData->args[3].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -2467,7 +2467,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_roundedRect(QV4::CallConte QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 6) + if (ctx->d()->callData->argc >= 6) r->d()->context->roundedRect(ctx->d()->callData->args[0].toNumber() , ctx->d()->callData->args[1].toNumber() , ctx->d()->callData->args[2].toNumber() @@ -2492,7 +2492,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_ellipse(QV4::CallContext * CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 4) + if (ctx->d()->callData->argc >= 4) r->d()->context->ellipse(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), ctx->d()->callData->args[3].toNumber()); return ctx->d()->callData->thisObject.asReturnedValue(); @@ -2510,7 +2510,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_text(QV4::CallContext *ctx QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 3) { + if (ctx->d()->callData->argc >= 3) { qreal x = ctx->d()->callData->args[1].toNumber(); qreal y = ctx->d()->callData->args[2].toNumber(); @@ -2554,7 +2554,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_isPointInPath(QV4::CallCon CHECK_CONTEXT(r) bool pointInPath = false; - if (ctx->d()->callData->argc == 2) + if (ctx->d()->callData->argc >= 2) pointInPath = r->d()->context->isPointInPath(ctx->d()->callData->args[0].toNumber(), ctx->d()->callData->args[1].toNumber()); return QV4::Primitive::fromBoolean(pointInPath).asReturnedValue(); } @@ -2776,7 +2776,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillText(QV4::CallContext QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 3) { + if (ctx->d()->callData->argc >= 3) { qreal x = ctx->d()->callData->args[1].toNumber(); qreal y = ctx->d()->callData->args[2].toNumber(); if (!qIsFinite(x) || !qIsFinite(y)) @@ -2800,7 +2800,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeText(QV4::CallContex QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 3) + if (ctx->d()->callData->argc >= 3) r->d()->context->drawText(ctx->d()->callData->args[0].toQStringNoThrow(), ctx->d()->callData->args[1].toNumber(), ctx->d()->callData->args[2].toNumber(), false); return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -2835,7 +2835,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_measureText(QV4::CallConte QV4::Scoped r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc == 1) { + if (ctx->d()->callData->argc >= 1) { QFontMetrics fm(r->d()->context->state.font); uint width = fm.width(ctx->d()->callData->args[0].toQStringNoThrow()); QV4::Scoped tm(scope, scope.engine->newObject()); @@ -2965,25 +2965,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_drawImage(QV4::CallContext if (pixmap.isNull() || !pixmap->isValid()) return ctx->d()->callData->thisObject.asReturnedValue(); - if (ctx->d()->callData->argc == 3) { - dx = ctx->d()->callData->args[1].toNumber(); - dy = ctx->d()->callData->args[2].toNumber(); - sx = 0; - sy = 0; - sw = pixmap->width(); - sh = pixmap->height(); - dw = sw; - dh = sh; - } else if (ctx->d()->callData->argc == 5) { - sx = 0; - sy = 0; - sw = pixmap->width(); - sh = pixmap->height(); - dx = ctx->d()->callData->args[1].toNumber(); - dy = ctx->d()->callData->args[2].toNumber(); - dw = ctx->d()->callData->args[3].toNumber(); - dh = ctx->d()->callData->args[4].toNumber(); - } else if (ctx->d()->callData->argc == 9) { + if (ctx->d()->callData->argc >= 9) { sx = ctx->d()->callData->args[1].toNumber(); sy = ctx->d()->callData->args[2].toNumber(); sw = ctx->d()->callData->args[3].toNumber(); @@ -2992,6 +2974,24 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_drawImage(QV4::CallContext dy = ctx->d()->callData->args[6].toNumber(); dw = ctx->d()->callData->args[7].toNumber(); dh = ctx->d()->callData->args[8].toNumber(); + } else if (ctx->d()->callData->argc >= 5) { + sx = 0; + sy = 0; + sw = pixmap->width(); + sh = pixmap->height(); + dx = ctx->d()->callData->args[1].toNumber(); + dy = ctx->d()->callData->args[2].toNumber(); + dw = ctx->d()->callData->args[3].toNumber(); + dh = ctx->d()->callData->args[4].toNumber(); + } else if (ctx->d()->callData->argc >= 3) { + dx = ctx->d()->callData->args[1].toNumber(); + dy = ctx->d()->callData->args[2].toNumber(); + sx = 0; + sy = 0; + sw = pixmap->width(); + sh = pixmap->height(); + dw = sw; + dh = sh; } else { return ctx->d()->callData->thisObject.asReturnedValue(); } @@ -3250,7 +3250,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_getImageData(QV4::CallCont CHECK_CONTEXT(r) QV8Engine *engine = scope.engine->v8Engine; - if (ctx->d()->callData->argc == 4) { + if (ctx->d()->callData->argc >= 4) { qreal x = ctx->d()->callData->args[0].toNumber(); qreal y = ctx->d()->callData->args[1].toNumber(); qreal w = ctx->d()->callData->args[2].toNumber(); @@ -3276,7 +3276,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_putImageData(QV4::CallCont QV4::Scope scope(ctx); QV4::Scoped r(scope, ctx->d()->callData->thisObject.as()); CHECK_CONTEXT(r) - if (ctx->d()->callData->argc != 3 && ctx->d()->callData->argc != 7) + if (ctx->d()->callData->argc < 7) return QV4::Encode::undefined(); QV4::ScopedValue arg0(scope, ctx->d()->callData->args[0]); -- cgit v1.2.3 From 5ec53b4d3e261743aabeda3ebaae0e2a10ff7025 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 12 Aug 2014 15:10:36 +0200 Subject: Fix typo in Context2D documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib6e2436ba383a2caf78ac359883338016c2b7668 Reviewed-by: Topi Reiniö Reviewed-by: Jędrzej Nowacki --- src/quick/items/context2d/qquickcontext2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index e7eef048cc..6a2b36d759 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -2876,7 +2876,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_strokeText(QV4::CallContex \brief Provides a Context2D TextMetrics interface The TextMetrics object can be created by QtQuick::Context2D::measureText method. - See \l{http://www.w3.org/TR/2dcontext/#textmetrics}{W3C 2d context TexMetrics} for more details. + See \l{http://www.w3.org/TR/2dcontext/#textmetrics}{W3C 2d context TextMetrics} for more details. \sa Context2D::measureText \sa width -- cgit v1.2.3 From 15ee12508ec8663ae09ebfc61cc4f0725311bdec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 11 Aug 2014 13:21:11 +0200 Subject: Cleanup: Separate the sub-tree layering out of QtQuick into the scene graph This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is generic for the scene graph and has no QtQuick dependencies. The interface separation allows scene graph backends to customize layers. Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3 Reviewed-by: Gunnar Sletta --- src/quick/items/context2d/qquickcanvascontext_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h index 2d8fbb5f85..8988ea9105 100644 --- a/src/quick/items/context2d/qquickcanvascontext_p.h +++ b/src/quick/items/context2d/qquickcanvascontext_p.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE class QQuickCanvasItem; -class QSGDynamicTexture; +class QSGLayer; class QQuickCanvasContextPrivate; class QQuickCanvasContext : public QObject -- cgit v1.2.3 From e7ceacda70857f68a4c406c898bcd9b517ac1b43 Mon Sep 17 00:00:00 2001 From: Jani Heikkinen Date: Fri, 22 Aug 2014 09:13:59 +0300 Subject: Update license headers and add new licenses - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen --- src/quick/items/context2d/qquickcanvascontext.cpp | 30 ++++++++-------------- src/quick/items/context2d/qquickcanvascontext_p.h | 30 ++++++++-------------- src/quick/items/context2d/qquickcanvasitem.cpp | 30 ++++++++-------------- src/quick/items/context2d/qquickcanvasitem_p.h | 30 ++++++++-------------- src/quick/items/context2d/qquickcontext2d.cpp | 30 ++++++++-------------- src/quick/items/context2d/qquickcontext2d_p.h | 30 ++++++++-------------- .../context2d/qquickcontext2dcommandbuffer.cpp | 30 ++++++++-------------- .../context2d/qquickcontext2dcommandbuffer_p.h | 30 ++++++++-------------- .../items/context2d/qquickcontext2dtexture.cpp | 30 ++++++++-------------- .../items/context2d/qquickcontext2dtexture_p.h | 30 ++++++++-------------- src/quick/items/context2d/qquickcontext2dtile.cpp | 30 ++++++++-------------- src/quick/items/context2d/qquickcontext2dtile_p.h | 30 ++++++++-------------- 12 files changed, 132 insertions(+), 228 deletions(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvascontext.cpp b/src/quick/items/context2d/qquickcanvascontext.cpp index 5d6aef0464..af2c988f10 100644 --- a/src/quick/items/context2d/qquickcanvascontext.cpp +++ b/src/quick/items/context2d/qquickcanvascontext.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h index 8988ea9105..e036e0b18d 100644 --- a/src/quick/items/context2d/qquickcanvascontext_p.h +++ b/src/quick/items/context2d/qquickcanvascontext_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index d184003b82..8d317f7fad 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 2e17b0463c..62970098e9 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index a3644c313b..228f0be3fe 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index c679bc33cb..dcfe6cfe50 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index 7b114ae45e..9e0a924462 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h index 8c7ffb0524..9b2fde33d8 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 17d4feae6b..a3b316a217 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h index 169eef8b95..10ac246d1b 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture_p.h +++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dtile.cpp b/src/quick/items/context2d/qquickcontext2dtile.cpp index c2f927d265..6beb8f2442 100644 --- a/src/quick/items/context2d/qquickcontext2dtile.cpp +++ b/src/quick/items/context2d/qquickcontext2dtile.cpp @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h index 50c416a27f..270094d04d 100644 --- a/src/quick/items/context2d/qquickcontext2dtile_p.h +++ b/src/quick/items/context2d/qquickcontext2dtile_p.h @@ -1,40 +1,32 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ +** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ -- cgit v1.2.3 From b0149afd075e8fa5b86bbe90501f46c4c63a52da Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Sat, 23 Aug 2014 14:13:53 +0200 Subject: Make Canvas a texture provider. Change-Id: I8b5c9d8a5ed9ef9079eafb30ef0cb73786204ee6 Reviewed-by: Laszlo Agocs --- src/quick/items/context2d/qquickcanvasitem.cpp | 83 ++++++++++++++++++++++---- src/quick/items/context2d/qquickcanvasitem_p.h | 3 + 2 files changed, 76 insertions(+), 10 deletions(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 8d317f7fad..878cc70586 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -52,6 +52,23 @@ QT_BEGIN_NAMESPACE +class QQuickCanvasNode : public QSGSimpleTextureNode +{ +public: + QQuickCanvasNode() { + qsgnode_set_description(this, QStringLiteral("canvasnode")); + setOwnsTexture(true); + } +}; + +class QQuickCanvasTextureProvider : public QSGTextureProvider +{ +public: + QQuickCanvasNode *node; + QSGTexture *texture() const Q_DECL_OVERRIDE { return node ? node->texture() : 0; } + void fireTextureChanged() { emit textureChanged(); } +}; + QQuickCanvasPixmap::QQuickCanvasPixmap(const QImage& image) : m_pixmap(0) , m_image(image) @@ -158,6 +175,8 @@ public: QHash > pixmaps; QUrl baseUrl; QMap animationCallbacks; + mutable QQuickCanvasTextureProvider *textureProvider; + QQuickCanvasNode *node; }; QQuickCanvasItemPrivate::QQuickCanvasItemPrivate() @@ -171,6 +190,8 @@ QQuickCanvasItemPrivate::QQuickCanvasItemPrivate() , available(false) , renderTarget(QQuickCanvasItem::Image) , renderStrategy(QQuickCanvasItem::Immediate) + , textureProvider(0) + , node(0) { implicitAntialiasing = true; } @@ -269,6 +290,11 @@ QQuickCanvasItemPrivate::~QQuickCanvasItemPrivate() them in the \c onImageLoaded handler. \endlist + Starting Qt 5.4, the Canvas is a + \l{QSGTextureProvider}{texture provider} + and can be used directly in \l {ShaderEffect}{ShaderEffects} and other + classes that consume texture providers. + \sa Context2D */ @@ -283,6 +309,8 @@ QQuickCanvasItem::~QQuickCanvasItem() { Q_D(QQuickCanvasItem); delete d->context; + if (d->textureProvider) + QQuickWindowQObjectCleanupJob::schedule(window(), d->textureProvider); } /*! @@ -597,6 +625,11 @@ void QQuickCanvasItem::releaseResources() delete d->context; d->context = 0; } + d->node = 0; // managed by the scene graph, just reset the pointer + if (d->textureProvider) { + QQuickWindowQObjectCleanupJob::schedule(window(), d->textureProvider); + d->textureProvider = 0; + } } void QQuickCanvasItem::invalidateSG() @@ -604,6 +637,9 @@ void QQuickCanvasItem::invalidateSG() Q_D(QQuickCanvasItem); d->context->deleteLater(); d->context = 0; + d->node = 0; // managed by the scene graph, just reset the pointer + delete d->textureProvider; + d->textureProvider = 0; } void QQuickCanvasItem::componentComplete() @@ -678,27 +714,25 @@ void QQuickCanvasItem::updatePolish() } } -class QQuickCanvasNode : public QSGSimpleTextureNode -{ -public: - ~QQuickCanvasNode() - { - delete texture(); - } -}; - QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) { Q_D(QQuickCanvasItem); if (!d->context || d->canvasWindow.size().isEmpty()) { + if (d->textureProvider) { + d->textureProvider->node = 0; + d->textureProvider->fireTextureChanged(); + } delete oldNode; return 0; } QQuickCanvasNode *node = static_cast(oldNode); - if (!node) + if (!node) { node = new QQuickCanvasNode(); + d->node = node; + } + if (d->smooth) node->setFiltering(QSGTexture::Linear); @@ -715,14 +749,43 @@ QSGNode *QQuickCanvasItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData QSGTexture *texture = factory->textureForNextFrame(node->texture()); if (!texture) { delete node; + d->node = 0; + if (d->textureProvider) { + d->textureProvider->node = 0; + d->textureProvider->fireTextureChanged(); + } return 0; } node->setTexture(texture); node->setRect(QRectF(QPoint(0, 0), d->canvasWindow.size())); + + if (d->textureProvider) { + d->textureProvider->node = node; + d->textureProvider->fireTextureChanged(); + } return node; } +bool QQuickCanvasItem::isTextureProvider() const +{ + return true; +} + +QSGTextureProvider *QQuickCanvasItem::textureProvider() const +{ + Q_D(const QQuickCanvasItem); + QQuickWindow *w = window(); + if (!w || !w->openglContext() || QThread::currentThread() != w->openglContext()->thread()) { + qWarning("QQuickCanvasItem::textureProvider: can only be queried on the rendering thread of an exposed window"); + return 0; + } + if (!d->textureProvider) + d->textureProvider = new QQuickCanvasTextureProvider; + d->textureProvider->node = d->node; + return d->textureProvider; +} + /*! \qmlmethod object QtQuick::Canvas::getContext(string contextId, any... args) diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 62970098e9..95bc6f395f 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -133,6 +133,9 @@ public: Q_INVOKABLE QString toDataURL(const QString& type = QLatin1String("image/png")) const; QQmlRefPointer loadedPixmap(const QUrl& url); + bool isTextureProvider() const Q_DECL_OVERRIDE; + QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE; + Q_SIGNALS: void paint(const QRect ®ion); void painted(); -- cgit v1.2.3 From 0de680c8e8fab36e386dca35e5008ffaa27e8ef6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 2 Sep 2014 11:49:50 +0200 Subject: Fix performance regression caused by SG signals in QQuickItem. For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll --- src/quick/items/context2d/qquickcanvasitem.cpp | 3 +-- src/quick/items/context2d/qquickcanvasitem_p.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 878cc70586..fffd4696a1 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -302,7 +302,6 @@ QQuickCanvasItem::QQuickCanvasItem(QQuickItem *parent) : QQuickItem(*(new QQuickCanvasItemPrivate), parent) { setFlag(ItemHasContents); - connect(this, SIGNAL(sceneGraphInvalidated()), this, SLOT(invalidateSG())); } QQuickCanvasItem::~QQuickCanvasItem() @@ -632,7 +631,7 @@ void QQuickCanvasItem::releaseResources() } } -void QQuickCanvasItem::invalidateSG() +void QQuickCanvasItem::invalidateSceneGraph() { Q_D(QQuickCanvasItem); d->context->deleteLater(); diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 95bc6f395f..b3509a5e58 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -159,7 +159,7 @@ public Q_SLOTS: private Q_SLOTS: void sceneGraphInitialized(); void checkAnimationCallbacks(); - void invalidateSG(); + void invalidateSceneGraph(); protected: void componentComplete(); -- cgit v1.2.3 From c5d9dc9367c3d3acf5fdf473c3288c8ccf2f2ef5 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 9 Sep 2014 16:25:54 +0200 Subject: Don't post deleteLater on invalid canvas contexts QCoreApplication complains about that. The context will only be valid once it has been requested in one way or another. Change-Id: Idb44f2541d71355443a5b491078a3040907b1614 Reviewed-by: Gunnar Sletta --- src/quick/items/context2d/qquickcanvasitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index fffd4696a1..f9e7bfd0ae 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -634,7 +634,8 @@ void QQuickCanvasItem::releaseResources() void QQuickCanvasItem::invalidateSceneGraph() { Q_D(QQuickCanvasItem); - d->context->deleteLater(); + if (d->context) + d->context->deleteLater(); d->context = 0; d->node = 0; // managed by the scene graph, just reset the pointer delete d->textureProvider; -- cgit v1.2.3