diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-04 10:24:46 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-04 10:28:48 +0200 |
commit | 9556f6d075b61fa95d6e1057f305e522a26f71d6 (patch) | |
tree | 53190472453390810c47b9b5a47b23188a00267e /src/quick/scenegraph/coreapi | |
parent | 42ffe9b193a5bd958b0853233fd0d94170722bd1 (diff) | |
parent | 1fd0cdc6a2e01775d8a79c6614910cc5a2fbf2b3 (diff) |
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
src/qml/jsruntime/qv4engine_p.h
src/quick/items/qquickitemsmodule.cpp
src/quick/items/qquicktext.cpp
src/quick/util/qquickpixmapcache.cpp
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
Diffstat (limited to 'src/quick/scenegraph/coreapi')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 8 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h | 7 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgnode.cpp | 14 |
3 files changed, 17 insertions, 12 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index f056b1767e..81e72b7946 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -1696,8 +1696,8 @@ void Renderer::uploadMergedElement(Element *e, int vaOffset, char **vertexData, if (((const QMatrix4x4_Accessor &) localx).flagBits == 1) { for (int i=0; i<vCount; ++i) { Pt *p = (Pt *) vdata; - p->x += ((QMatrix4x4_Accessor &) localx).m[3][0]; - p->y += ((QMatrix4x4_Accessor &) localx).m[3][1]; + p->x += ((const QMatrix4x4_Accessor &) localx).m[3][0]; + p->y += ((const QMatrix4x4_Accessor &) localx).m[3][1]; vdata += vSize; } } else if (((const QMatrix4x4_Accessor &) localx).flagBits > 1) { @@ -1938,11 +1938,11 @@ void Renderer::uploadBatch(Batch *b) if (attr.isVertexCoordinate) dump << "* "; for (int t=0; t<attr.tupleSize; ++t) - dump << *(float *)(vd + offset + t * sizeof(float)) << " "; + dump << *(const float *)(vd + offset + t * sizeof(float)) << " "; } else if (attr.type == GL_UNSIGNED_BYTE) { dump << "ubyte "; for (int t=0; t<attr.tupleSize; ++t) - dump << *(unsigned char *)(vd + offset + t * sizeof(unsigned char)) << " "; + dump << *(const unsigned char *)(vd + offset + t * sizeof(unsigned char)) << " "; } dump << ") "; offset += attr.tupleSize * size_of_type(attr.type); diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h index 8996d5a092..f87dd75c8c 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h @@ -85,7 +85,12 @@ public: for (int i=0; i<PageSize; ++i) blocks[i] = i; } - Type *at(uint index) const + const Type *at(uint index) const + { + return (Type *) &data[index * sizeof(Type)]; + } + + Type *at(uint index) { return (Type *) &data[index * sizeof(Type)]; } diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp index e52713e804..71f4f62db9 100644 --- a/src/quick/scenegraph/coreapi/qsgnode.cpp +++ b/src/quick/scenegraph/coreapi/qsgnode.cpp @@ -1457,7 +1457,7 @@ QDebug operator<<(QDebug d, const QSGGeometryNode *n) d << "Geometry(null)"; return d; } - d << "GeometryNode(" << hex << (void *) n << dec; + d << "GeometryNode(" << hex << (const void *) n << dec; const QSGGeometry *g = n->geometry(); @@ -1508,7 +1508,7 @@ QDebug operator<<(QDebug d, const QSGClipNode *n) d << "ClipNode(null)"; return d; } - d << "ClipNode(" << hex << (void *) n << dec; + d << "ClipNode(" << hex << (const void *) n << dec; if (n->childCount()) d << "children=" << n->childCount(); @@ -1531,7 +1531,7 @@ QDebug operator<<(QDebug d, const QSGTransformNode *n) } const QMatrix4x4 m = n->matrix(); d << "TransformNode("; - d << hex << (void *) n << dec; + d << hex << (const void *) n << dec; if (m.isIdentity()) d << "identity"; else if (m.determinant() == 1 && m(0, 0) == 1 && m(1, 1) == 1 && m(2, 2) == 1) @@ -1553,7 +1553,7 @@ QDebug operator<<(QDebug d, const QSGOpacityNode *n) return d; } d << "OpacityNode("; - d << hex << (void *) n << dec; + d << hex << (const void *) n << dec; d << "opacity=" << n->opacity() << "combined=" << n->combinedOpacity() << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); @@ -1571,7 +1571,7 @@ QDebug operator<<(QDebug d, const QSGRootNode *n) d << "RootNode(null)"; return d; } - d << "RootNode" << hex << (void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); + d << "RootNode" << hex << (const void *) n << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); #ifdef QSG_RUNTIME_DESCRIPTION d << QSGNodePrivate::description(n); #endif @@ -1604,7 +1604,7 @@ QDebug operator<<(QDebug d, const QSGNode *n) d << static_cast<const QSGOpacityNode *>(n); break; case QSGNode::RenderNodeType: - d << "RenderNode(" << hex << (void *) n << dec + d << "RenderNode(" << hex << (const void *) n << dec << "flags=" << (int) n->flags() << dec << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); #ifdef QSG_RUNTIME_DESCRIPTION @@ -1613,7 +1613,7 @@ QDebug operator<<(QDebug d, const QSGNode *n) d << ')'; break; default: - d << "Node(" << hex << (void *) n << dec + d << "Node(" << hex << (const void *) n << dec << "flags=" << (int) n->flags() << dec << (n->isSubtreeBlocked() ? "*BLOCKED*" : ""); #ifdef QSG_RUNTIME_DESCRIPTION |