diff options
author | Laszlo Agocs <[email protected]> | 2016-06-03 13:49:51 +0200 |
---|---|---|
committer | Laszlo Agocs <[email protected]> | 2016-06-22 13:11:14 +0000 |
commit | 65c877f40e965c368fe6e7ed730242461b5824b7 (patch) | |
tree | f23a8b64b5e3530ba5714ce1a0339302e5336ae8 /src/quick/items/qquicktextedit.cpp | |
parent | 702c4247d74ffb7e4fb1aaca96d70f4591203ba2 (diff) |
Add cross-backend simple rect, texture, and ninepatch nodes
QSGSimpleRectNode is deprecated -> use
QSGRectangleNode via QQuickWindow::createRectangleNode() instead.
QSGSimpleTextureNode is deprecated -> use
QSGImageNode via QQuickWindow::createImageNode() instead.
The OpenGL version of the simple rectangle node is switched over to
the vertex color material instead of flat, to allow for better batching.
Use the same concept for nine patch nodes. The "style" node from Quick Controls 1
is now QSGNinePatchNode in order to provide a proper cross-backend solution which
is already necessary due to the software backend, but now generalize it to apply
to the accelerated backends with proper materials as well. QC can now simply call
createNinePatchNode() without further ado.
Also fixes a bug with the D3D12 texture material not enabling blending
when needed.
When it comes to the internal class names, QSGRectangleNode and
QSGImageNode get the Internal prefix in the adaptation layer in order to
differentiate from the public API. This involves quite a lot of renaming,
but results in a nice and clean public API.
Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea
Reviewed-by: Gunnar Sletta <[email protected]>
Diffstat (limited to 'src/quick/items/qquicktextedit.cpp')
-rw-r--r-- | src/quick/items/qquicktextedit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 36eb5d3cde..eb568c48d4 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -153,7 +153,7 @@ namespace { newNode->setFlag(QSGNode::OwnedByParent); } - void resetCursorNode(QSGRectangleNode* newNode) + void resetCursorNode(QSGInternalRectangleNode* newNode) { if (cursorNode) removeChildNode(cursorNode); @@ -165,7 +165,7 @@ namespace { } } - QSGRectangleNode *cursorNode; + QSGInternalRectangleNode *cursorNode; QQuickTextNode* frameDecorationsNode; }; @@ -2125,9 +2125,9 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData * } if (d->cursorComponent == 0) { - QSGRectangleNode* cursor = 0; + QSGInternalRectangleNode* cursor = 0; if (!isReadOnly() && d->cursorVisible && d->control->cursorOn()) - cursor = d->sceneGraphContext()->createRectangleNode(d->control->cursorRect(), d->color); + cursor = d->sceneGraphContext()->createInternalRectangleNode(d->control->cursorRect(), d->color); rootNode->resetCursorNode(cursor); } |